Skip to content

Commit

Permalink
Merge branch 'master' into patch-7
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] committed Aug 19, 2020
2 parents eef6d7e + 366c781 commit 6108163
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/issue-label-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Set Issue Label and Assignee"
on:
issues:
types: [opened, edited]

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -44,8 +44,8 @@ jobs:
{"keywords":["[@aws-cdk/aws-chatbot]","[aws-chatbot]","[chatbot]"],"labels":["@aws-cdk/aws-chatbot"],"assignees":["MrArnoldPalmer"]},
{"keywords":["[@aws-cdk/aws-cloud9]","[aws-cloud9]","[cloud9]","[cloud 9]"],"labels":["@aws-cdk/aws-cloud9"],"assignees":["skinny85"]},
{"keywords":["[@aws-cdk/aws-cloudformation]","[aws-cloudformation]","[cloudformation]","[cloud formation]"],"labels":["@aws-cdk/aws-cloudformation"],"assignees":["rix0rrr"]},
{"keywords":["[@aws-cdk/aws-cloudfront]","[aws-cloudfront]","[cloudfront]","[cloud front]"],"labels":["@aws-cdk/aws-cloudfront"],"assignees":["iliapolo"]},
{"keywords":["[@aws-cdk/aws-cloudfront-origins]","[aws-cloudfront-origins]","[cloudfront-origins]","[cloudfront origins]"],"labels":["@aws-cdk/aws-cloudfront-origins"],"assignees":["iliapolo"]},
{"keywords":["[@aws-cdk/aws-cloudfront]","[aws-cloudfront]","[cloudfront]","[cloud front]"],"labels":["@aws-cdk/aws-cloudfront"],"assignees":["njlynch"]},
{"keywords":["[@aws-cdk/aws-cloudfront-origins]","[aws-cloudfront-origins]","[cloudfront-origins]","[cloudfront origins]"],"labels":["@aws-cdk/aws-cloudfront-origins"],"assignees":["njlynch"]},
{"keywords":["[@aws-cdk/aws-cloudtrail]","[aws-cloudtrail]","[cloudtrail]","[cloud trail]"],"labels":["@aws-cdk/aws-cloudtrail"],"assignees":["rix0rrr"]},
{"keywords":["[@aws-cdk/aws-cloudwatch]","[aws-cloudwatch]","[cloudwatch]","[cloud watch]"],"labels":["@aws-cdk/aws-cloudwatch"],"assignees":["rix0rrr"]},
{"keywords":["[@aws-cdk/aws-cloudwatch-actions]","[aws-cloudwatch-actions]","[cloudwatch-actions]","[cloudwatch actions]"],"labels":["@aws-cdk/aws-cloudwatch-actions"],"assignees":["rix0rrr"]},
Expand Down
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-cloudfront-origins/lib/s3-origin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class S3BucketOrigin extends cloudfront.OriginBase {

public bind(scope: cdk.Construct, options: cloudfront.OriginBindOptions): cloudfront.OriginBindConfig {
if (!this.originAccessIdentity) {
this.originAccessIdentity = new cloudfront.OriginAccessIdentity(scope, 'S3Origin');
this.originAccessIdentity = new cloudfront.OriginAccessIdentity(scope, 'S3Origin', {
comment: `Access identity for ${options.originId}`,
});
this.bucket.grantRead(this.originAccessIdentity);
}
return super.bind(scope, options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"Type": "AWS::CloudFront::CloudFrontOriginAccessIdentity",
"Properties": {
"CloudFrontOriginAccessIdentityConfig": {
"Comment": "Allows CloudFront to reach the bucket"
"Comment": "Access identity for cloudfrontorigingroupDistributionOrigin137659A54"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"Type": "AWS::CloudFront::CloudFrontOriginAccessIdentity",
"Properties": {
"CloudFrontOriginAccessIdentityConfig": {
"Comment": "Allows CloudFront to reach the bucket"
"Comment": "Access identity for cloudfronts3originDistributionOrigin1741C4E95"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('With bucket', () => {

expect(stack).toHaveResourceLike('AWS::CloudFront::CloudFrontOriginAccessIdentity', {
CloudFrontOriginAccessIdentityConfig: {
Comment: 'Allows CloudFront to reach the bucket',
Comment: 'Access identity for StackDistOrigin15754CE84',
},
});
expect(stack).toHaveResourceLike('AWS::S3::BucketPolicy', {
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-cloudfront/lib/distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ export class Distribution extends Resource implements IDistribution {
priceClass: props.priceClass ?? undefined,
restrictions: this.renderRestrictions(props.geoRestriction),
viewerCertificate: this.certificate ? this.renderViewerCertificate(this.certificate) : undefined,
webAclId: props.webAclId,
},
});

Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ test('exhaustive example of props renders correctly', () => {
SslSupportMethod: 'sni-only',
MinimumProtocolVersion: 'TLSv1.2_2019',
},
WebACLId: '473e64fd-f30b-4765-81a0-62ad96dd167a',
},
});
});
Expand Down
9 changes: 8 additions & 1 deletion packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import { Mode } from '../aws-auth/credentials';
import { AwsCliCompatible } from './awscli-compatible';
import { ISDK, SDK } from './sdk';


// Some configuration that can only be achieved by setting
// environment variables.
process.env.AWS_STS_REGIONAL_ENDPOINTS = 'regional';
process.env.AWS_NODEJS_CONNECTION_REUSE_ENABLED = '1';

/**
* Options for the default SDK provider
*/
Expand Down Expand Up @@ -82,7 +88,7 @@ const CACHED_DEFAULT_CREDENTIALS = Symbol('cached_default_credentials');
*/
export class SdkProvider {
/**
* Create a new SdkProvider which gets its defaults in a way that haves like the AWS CLI does
* Create a new SdkProvider which gets its defaults in a way that behaves like the AWS CLI does
*
* The AWS SDK for JS behaves slightly differently from the AWS CLI in a number of ways; see the
* class `AwsCliCompatible` for the details.
Expand Down Expand Up @@ -302,6 +308,7 @@ function parseHttpOptions(options: SdkHttpOptions) {
debug('Using CA bundle path: %s', caBundlePath);
config.httpOptions.agent = new https.Agent({
ca: readIfPossible(caBundlePath),
keepAlive: true,
});
}

Expand Down
2 changes: 2 additions & 0 deletions packages/cdk-assets/bin/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class DefaultAwsClient implements IAws {
constructor(profile?: string) {
// Force AWS SDK to look in ~/.aws/credentials and potentially use the configured profile.
process.env.AWS_SDK_LOAD_CONFIG = '1';
process.env.AWS_STS_REGIONAL_ENDPOINTS = 'regional';
process.env.AWS_NODEJS_CONNECTION_REUSE_ENABLED = '1';
if (profile) {
process.env.AWS_PROFILE = profile;
}
Expand Down

0 comments on commit 6108163

Please sign in to comment.