Skip to content

Commit 8cbd19b

Browse files
authored
Merge branch 'master' into DaWyz/nlb-access-logs-permissions-issue
2 parents df334cd + 68cbcb4 commit 8cbd19b

File tree

88 files changed

+3753
-529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+3753
-529
lines changed

.github/ISSUE_TEMPLATE/bug.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ what is the error message you are seeing?
3333

3434
- **CLI Version :**
3535
- **Framework Version:**
36+
- **Node.js Version:** <!-- Version of Node.js (run the command `node -v`) -->
3637
- **OS :**
37-
- **Language :**
38+
- **Language (Version):** <!-- [all | TypeScript (3.8.3) | Java (8)| Python (3.7.3) | etc... ] -->
3839

3940
### Other
4041

.github/ISSUE_TEMPLATE/general-issues.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ falling prey to the [X/Y problem][2]!
2525

2626
- **CDK CLI Version:** <!-- Output of `cdk version` -->
2727
- **Module Version:** <!-- Version of the module in question -->
28+
- **Node.js Version:** <!-- Version of Node.js (run the command `node -v`) -->
2829
- **OS:** <!-- [all | Windows 10 | OSX Mojave | Ubuntu | etc... ] -->
29-
- **Language:** <!-- [all | TypeScript | Java | Python ] etc... ] -->
30+
- **Language (Version):** <!-- [all | TypeScript (3.8.3) | Java (8)| Python (3.7.3) | etc... ] -->
3031

3132

3233
### Other information

CHANGELOG.md

+49
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,55 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [1.44.0](https://github.com/aws/aws-cdk/compare/v1.43.0...v1.44.0) (2020-06-04)
6+
7+
8+
### Features
9+
10+
* **ecs-patterns:** support min and max health percentage in queueprocessingservice ([#8312](https://github.com/aws/aws-cdk/issues/8312)) ([6da564d](https://github.com/aws/aws-cdk/commit/6da564d68c5195c88c5959b7375e2973c2b07676))
11+
12+
## [1.43.0](https://github.com/aws/aws-cdk/compare/v1.42.1...v1.43.0) (2020-06-03)
13+
14+
15+
### ⚠ BREAKING CHANGES
16+
17+
* **rds:** the default retention policy for RDS Cluster and DbInstance is now 'Snapshot'
18+
* **cognito:** OAuth flows `authorizationCodeGrant` and
19+
`implicitCodeGrant` in `UserPoolClient` are enabled by default.
20+
* **cognito:** `callbackUrl` property in `UserPoolClient` is now
21+
optional and has a default.
22+
* **cognito:** All OAuth scopes in a `UserPoolClient` are now enabled
23+
by default.
24+
25+
### Features
26+
27+
* **cfn-include:** add support for Conditions ([#8144](https://github.com/aws/aws-cdk/issues/8144)) ([33212d2](https://github.com/aws/aws-cdk/commit/33212d2c3adfc5a06ec4557787aea1b3cd1e8143))
28+
* **cognito:** addDomain() on an imported user pool ([#8123](https://github.com/aws/aws-cdk/issues/8123)) ([49c9f99](https://github.com/aws/aws-cdk/commit/49c9f99c4dfd73bf53a461a844a1d9b0c02d3761))
29+
* **cognito:** sign in url for a UserPoolDomain ([#8155](https://github.com/aws/aws-cdk/issues/8155)) ([e942936](https://github.com/aws/aws-cdk/commit/e94293675b0a9ebeb5876283d6a54427391469bd))
30+
* **cognito:** user pool identity provider with support for Facebook & Amazon ([#8134](https://github.com/aws/aws-cdk/issues/8134)) ([1ad919f](https://github.com/aws/aws-cdk/commit/1ad919fecf7cda45293efc3c0805b2eb5b49ed69))
31+
* **dynamodb:** allow providing indexes when importing a Table ([#8245](https://github.com/aws/aws-cdk/issues/8245)) ([9ee61eb](https://github.com/aws/aws-cdk/commit/9ee61eb96de54fcbb71e41a2db2c1c9ec6b7b8d9)), closes [#6392](https://github.com/aws/aws-cdk/issues/6392)
32+
* **events-targets:** kinesis stream as event rule target ([#8176](https://github.com/aws/aws-cdk/issues/8176)) ([21ebc2d](https://github.com/aws/aws-cdk/commit/21ebc2dfdcc202bac47083d4c7d06e1ae4df0709)), closes [#2997](https://github.com/aws/aws-cdk/issues/2997)
33+
* **lambda-nodejs:** allow passing env vars to container ([#8169](https://github.com/aws/aws-cdk/issues/8169)) ([1755cf2](https://github.com/aws/aws-cdk/commit/1755cf274b4da446272f109b55b20680beb34fe7)), closes [#8031](https://github.com/aws/aws-cdk/issues/8031)
34+
* **rds:** change the default retention policy of Cluster and DB Instance to Snapshot ([#8023](https://github.com/aws/aws-cdk/issues/8023)) ([2d83328](https://github.com/aws/aws-cdk/commit/2d833280be7a8550ab4a713e7213f1dd351f9767)), closes [#3298](https://github.com/aws/aws-cdk/issues/3298)
35+
* **redshift:** add initial L2 Redshift construct ([#5730](https://github.com/aws/aws-cdk/issues/5730)) ([703f0fa](https://github.com/aws/aws-cdk/commit/703f0fa6e2ba5e668d6a92200493d19d2af626c0)), closes [#5711](https://github.com/aws/aws-cdk/issues/5711)
36+
* **s3:** supports RemovalPolicy for BucketPolicy ([#8158](https://github.com/aws/aws-cdk/issues/8158)) ([cb71f34](https://github.com/aws/aws-cdk/commit/cb71f340343011a2a2de9758879a56e898b8e12c)), closes [#7415](https://github.com/aws/aws-cdk/issues/7415)
37+
* **stepfunctions-tasks:** start a nested state machine execution as a construct ([#8178](https://github.com/aws/aws-cdk/issues/8178)) ([3000dd5](https://github.com/aws/aws-cdk/commit/3000dd58cbe05cc483e30da6c8b18e9e3bf27e0f))
38+
* **stepfunctions-tasks:** task state construct to submit a job to AWS Batch ([#8115](https://github.com/aws/aws-cdk/issues/8115)) ([bc41cd5](https://github.com/aws/aws-cdk/commit/bc41cd5662314202c9bd8af87587990ad0b50282))
39+
40+
41+
### Bug Fixes
42+
43+
* **apigateway:** deployment is not updated when OpenAPI definition is updated ([#8207](https://github.com/aws/aws-cdk/issues/8207)) ([d28c947](https://github.com/aws/aws-cdk/commit/d28c9473e0f480eba06e7dc9c260e4372501fc36)), closes [#8159](https://github.com/aws/aws-cdk/issues/8159)
44+
* **app-delivery:** could not use PipelineDeployStackAction more than once in a Stage ([#8217](https://github.com/aws/aws-cdk/issues/8217)) ([9a54447](https://github.com/aws/aws-cdk/commit/9a54447f2a7d7e3a5d31a57bb3b2e2b0555430a1)), closes [#3984](https://github.com/aws/aws-cdk/issues/3984) [#8183](https://github.com/aws/aws-cdk/issues/8183)
45+
* **cli:** termination protection not updated when change set has no changes ([#8275](https://github.com/aws/aws-cdk/issues/8275)) ([29d3145](https://github.com/aws/aws-cdk/commit/29d3145d1f4d7e17cd20f197d3c4955f48d07b37))
46+
* **codepipeline:** allow multiple CodeCommit source actions using events ([#8018](https://github.com/aws/aws-cdk/issues/8018)) ([103c144](https://github.com/aws/aws-cdk/commit/103c1449683ffc131b696faff8b16f0935a3c3f4)), closes [#7802](https://github.com/aws/aws-cdk/issues/7802)
47+
* **codepipeline:** correctly handle CODEBUILD_CLONE_REF in BitBucket source ([#7107](https://github.com/aws/aws-cdk/issues/7107)) ([ac001b8](https://github.com/aws/aws-cdk/commit/ac001b86bbff1801005cac1509e4480a30bf8f15))
48+
* **codepipeline:** unhelpful artifact validation messages ([#8256](https://github.com/aws/aws-cdk/issues/8256)) ([2a2406e](https://github.com/aws/aws-cdk/commit/2a2406e5cc16e3bcce4e355f54b31ca8a7c2ace6))
49+
* **core:** CFN version and description template sections were merged incorrectly ([#8251](https://github.com/aws/aws-cdk/issues/8251)) ([b7e328d](https://github.com/aws/aws-cdk/commit/b7e328da4e7720c27bd7e828ffe3d3ae9dc1d070)), closes [#8151](https://github.com/aws/aws-cdk/issues/8151)
50+
* **lambda:** `SingletonFunction.grantInvoke()` API fails with error 'No child with id' ([#8296](https://github.com/aws/aws-cdk/issues/8296)) ([a8b1815](https://github.com/aws/aws-cdk/commit/a8b1815f47b140b0fb06a3df0314c0fe28816fb6)), closes [#8240](https://github.com/aws/aws-cdk/issues/8240)
51+
* **rds:** cannot delete a stack with DbCluster set to 'Retain' ([#8110](https://github.com/aws/aws-cdk/issues/8110)) ([c2e534e](https://github.com/aws/aws-cdk/commit/c2e534ecab219be8cd8174b60da3b58072dcfd47)), closes [#5282](https://github.com/aws/aws-cdk/issues/5282)
52+
* **sqs:** unable to use CfnParameter 'valueAsNumber' to specify queue properties ([#8252](https://github.com/aws/aws-cdk/issues/8252)) ([8ec405f](https://github.com/aws/aws-cdk/commit/8ec405f5c016d0cbe1b9eeea6649e1e68f9b76e7)), closes [#7126](https://github.com/aws/aws-cdk/issues/7126)
53+
554
## [1.42.1](https://github.com/aws/aws-cdk/compare/v1.42.0...v1.42.1) (2020-06-01)
655

756

design/aws-guidelines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ export interface IFoo extends cdk.IConstruct, ISomething {
320320

321321
// attributes
322322
readonly fooArn: string;
323-
readonly fooBoo: string;
323+
readonly fooBoo: string[];
324324

325325
// security group connections (if applicable)
326326
readonly connections: ec2.Connections;

fetch-dotnet-snk.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ function echo_usage() {
1111
echo -e "\tDOTNET_STRONG_NAME_SECRET_ID=<The name (i.e. production/my/key) or ARN of the secret containing the .snk file.>"
1212
}
1313

14-
if [ -z "${DOTNET_STRONG_NAME_ENABLED:-}" ]; then
15-
echo "Environment variable DOTNET_STRONG_NAME_ENABLED is not set. Skipping strong-name signing."
14+
if [ "${DOTNET_STRONG_NAME_ENABLED:-false}" != "true" ]; then
15+
echo "Environment variable DOTNET_STRONG_NAME_ENABLED is not set to true. Skipping strong-name signing."
1616
exit 0
1717
fi
1818

1919
echo "Retrieving SNK..."
2020

21-
apt update -y
22-
apt install jq -y
21+
yum install jq -y
2322

2423
if [ -z "${DOTNET_STRONG_NAME_ROLE_ARN:-}" ]; then
2524
echo "Strong name signing is enabled, but DOTNET_STRONG_NAME_ROLE_ARN is not set."

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"tools/*"
1111
],
1212
"rejectCycles": "true",
13-
"version": "1.42.1"
13+
"version": "1.44.0"
1414
}

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
},
1616
"devDependencies": {
1717
"conventional-changelog-cli": "^2.0.34",
18-
"fs-extra": "^8.1.0",
19-
"jsii-diff": "^1.5.0",
20-
"jsii-pacmak": "^1.5.0",
21-
"jsii-rosetta": "^1.5.0",
22-
"lerna": "^3.21.0",
18+
"fs-extra": "^9.0.1",
19+
"jsii-diff": "^1.6.0",
20+
"jsii-pacmak": "^1.6.0",
21+
"jsii-rosetta": "^1.6.0",
22+
"lerna": "^3.22.0",
2323
"standard-version": "^8.0.0",
2424
"graceful-fs": "^4.2.4",
2525
"typescript": "~3.8.3"

packages/@aws-cdk/assets/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"devDependencies": {
6666
"@aws-cdk/assert": "0.0.0",
6767
"@types/nodeunit": "^0.0.31",
68-
"@types/sinon": "^9.0.3",
68+
"@types/sinon": "^9.0.4",
6969
"aws-cdk": "0.0.0",
7070
"cdk-build-tools": "0.0.0",
7171
"cdk-integ-tools": "0.0.0",

packages/@aws-cdk/aws-apigateway/lib/authorizers/lambda.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class TokenAuthorizer extends LambdaAuthorizer {
170170
name: props.authorizerName ?? this.node.uniqueId,
171171
restApiId,
172172
type: 'TOKEN',
173-
authorizerUri: `arn:aws:apigateway:${Stack.of(this).region}:lambda:path/2015-03-31/functions/${props.handler.functionArn}/invocations`,
173+
authorizerUri: lambdaAuthorizerArn(props.handler),
174174
authorizerCredentials: props.assumeRole?.roleArn,
175175
authorizerResultTtlInSeconds: props.resultsCacheTtl?.toSeconds(),
176176
identitySource: props.identitySource || 'method.request.header.Authorization',
@@ -232,7 +232,7 @@ export class RequestAuthorizer extends LambdaAuthorizer {
232232
name: props.authorizerName ?? this.node.uniqueId,
233233
restApiId,
234234
type: 'REQUEST',
235-
authorizerUri: `arn:aws:apigateway:${Stack.of(this).region}:lambda:path/2015-03-31/functions/${props.handler.functionArn}/invocations`,
235+
authorizerUri: lambdaAuthorizerArn(props.handler),
236236
authorizerCredentials: props.assumeRole?.roleArn,
237237
authorizerResultTtlInSeconds: props.resultsCacheTtl?.toSeconds(),
238238
identitySource: props.identitySources.map(is => is.toString()).join(','),
@@ -248,3 +248,10 @@ export class RequestAuthorizer extends LambdaAuthorizer {
248248
this.setupPermissions();
249249
}
250250
}
251+
252+
/**
253+
* constructs the authorizerURIArn.
254+
*/
255+
function lambdaAuthorizerArn(handler: lambda.IFunction) {
256+
return `arn:${Stack.of(handler).partition}:apigateway:${Stack.of(handler).region}:lambda:path/2015-03-31/functions/${handler.functionArn}/invocations`;
257+
}

packages/@aws-cdk/aws-apigateway/lib/integration.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ export interface IntegrationProps {
113113
* - If you specify HTTP for the `type` property, specify the API endpoint URL.
114114
* - If you specify MOCK for the `type` property, don't specify this property.
115115
* - If you specify AWS for the `type` property, specify an AWS service that
116-
* follows this form: `arn:aws:apigateway:region:subdomain.service|service:path|action/service_api.`
116+
* follows this form: `arn:partition:apigateway:region:subdomain.service|service:path|action/service_api.`
117117
* For example, a Lambda function URI follows this form:
118-
* arn:aws:apigateway:region:lambda:path/path. The path is usually in the
118+
* arn:partition:apigateway:region:lambda:path/path. The path is usually in the
119119
* form /2015-03-31/functions/LambdaFunctionARN/invocations.
120120
*
121121
* @see https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/#uri

packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.expected.json

+29-25
Original file line numberDiff line numberDiff line change
@@ -131,30 +131,6 @@
131131
"Name": "MyRestApi"
132132
}
133133
},
134-
"MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": {
135-
"Type": "AWS::ApiGateway::Deployment",
136-
"Properties": {
137-
"RestApiId": {
138-
"Ref": "MyRestApi2D1F47A9"
139-
},
140-
"Description": "Automatically created by the RestApi construct"
141-
},
142-
"DependsOn": [
143-
"MyRestApiANY05143F93"
144-
]
145-
},
146-
"MyRestApiDeploymentStageprodC33B8E5F": {
147-
"Type": "AWS::ApiGateway::Stage",
148-
"Properties": {
149-
"RestApiId": {
150-
"Ref": "MyRestApi2D1F47A9"
151-
},
152-
"DeploymentId": {
153-
"Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb"
154-
},
155-
"StageName": "prod"
156-
}
157-
},
158134
"MyRestApiCloudWatchRoleD4042E8E": {
159135
"Type": "AWS::IAM::Role",
160136
"Properties": {
@@ -200,6 +176,30 @@
200176
"MyRestApi2D1F47A9"
201177
]
202178
},
179+
"MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": {
180+
"Type": "AWS::ApiGateway::Deployment",
181+
"Properties": {
182+
"RestApiId": {
183+
"Ref": "MyRestApi2D1F47A9"
184+
},
185+
"Description": "Automatically created by the RestApi construct"
186+
},
187+
"DependsOn": [
188+
"MyRestApiANY05143F93"
189+
]
190+
},
191+
"MyRestApiDeploymentStageprodC33B8E5F": {
192+
"Type": "AWS::ApiGateway::Stage",
193+
"Properties": {
194+
"RestApiId": {
195+
"Ref": "MyRestApi2D1F47A9"
196+
},
197+
"DeploymentId": {
198+
"Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb"
199+
},
200+
"StageName": "prod"
201+
}
202+
},
203203
"MyRestApiANY05143F93": {
204204
"Type": "AWS::ApiGateway::Method",
205205
"Properties": {
@@ -247,7 +247,11 @@
247247
"Fn::Join": [
248248
"",
249249
[
250-
"arn:aws:apigateway:",
250+
"arn:",
251+
{
252+
"Ref": "AWS::Partition"
253+
},
254+
":apigateway:",
251255
{
252256
"Ref": "AWS::Region"
253257
},

packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.expected.json

+29-25
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@
119119
"Fn::Join": [
120120
"",
121121
[
122-
"arn:aws:apigateway:",
122+
"arn:",
123+
{
124+
"Ref": "AWS::Partition"
125+
},
126+
":apigateway:",
123127
{
124128
"Ref": "AWS::Region"
125129
},
@@ -170,30 +174,6 @@
170174
"Name": "MyRestApi"
171175
}
172176
},
173-
"MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": {
174-
"Type": "AWS::ApiGateway::Deployment",
175-
"Properties": {
176-
"RestApiId": {
177-
"Ref": "MyRestApi2D1F47A9"
178-
},
179-
"Description": "Automatically created by the RestApi construct"
180-
},
181-
"DependsOn": [
182-
"MyRestApiANY05143F93"
183-
]
184-
},
185-
"MyRestApiDeploymentStageprodC33B8E5F": {
186-
"Type": "AWS::ApiGateway::Stage",
187-
"Properties": {
188-
"RestApiId": {
189-
"Ref": "MyRestApi2D1F47A9"
190-
},
191-
"DeploymentId": {
192-
"Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb"
193-
},
194-
"StageName": "prod"
195-
}
196-
},
197177
"MyRestApiCloudWatchRoleD4042E8E": {
198178
"Type": "AWS::IAM::Role",
199179
"Properties": {
@@ -239,6 +219,30 @@
239219
"MyRestApi2D1F47A9"
240220
]
241221
},
222+
"MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb": {
223+
"Type": "AWS::ApiGateway::Deployment",
224+
"Properties": {
225+
"RestApiId": {
226+
"Ref": "MyRestApi2D1F47A9"
227+
},
228+
"Description": "Automatically created by the RestApi construct"
229+
},
230+
"DependsOn": [
231+
"MyRestApiANY05143F93"
232+
]
233+
},
234+
"MyRestApiDeploymentStageprodC33B8E5F": {
235+
"Type": "AWS::ApiGateway::Stage",
236+
"Properties": {
237+
"RestApiId": {
238+
"Ref": "MyRestApi2D1F47A9"
239+
},
240+
"DeploymentId": {
241+
"Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb"
242+
},
243+
"StageName": "prod"
244+
}
245+
},
242246
"MyRestApiANY05143F93": {
243247
"Type": "AWS::ApiGateway::Method",
244248
"Properties": {

0 commit comments

Comments
 (0)