Skip to content

Commit 99e188c

Browse files
authored
Merge branch 'master' into huijbers/forward-to-alpha
2 parents 30af908 + fd8e0e3 commit 99e188c

File tree

111 files changed

+3500
-1375
lines changed

Some content is hidden

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

111 files changed

+3500
-1375
lines changed

.github/workflows/issue-label-assign.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
{"area":"package/tools","keywords":["cli","command line","init","synth","diff","bootstrap"],"labels":["package/tools"],"assignees":["rix0rrr"]},
2424
{"area":"@aws-cdk/alexa-ask","keywords":["alexa-ask","alexa", "cfnskill"],"labels":["@aws-cdk/alexa-ask"],"assignees":["madeline-k"]},
2525
{"area":"@aws-cdk/app-delivery","keywords":["app-delivery","PipelineDeployStackAction"],"labels":["@aws-cdk/app-delivery"],"assignees":["skinny85"]},
26-
{"area":"@aws-cdk/assert","keywords":["assert"],"labels":["@aws-cdk/assert"],"assignees":["kaizen3031593"]},
27-
{"area":"@aws-cdk/assertions","keywords":["assertions"],"labels":["@aws-cdk/assertions"],"assignees":["kaizen3031593"]},
26+
{"area":"@aws-cdk/assert","keywords":["assert", "@aws-cdk/assert"],"labels":["@aws-cdk/assert"],"assignees":["kaizen3031593"]},
27+
{"area":"@aws-cdk/assertions","keywords":["assertions", "@aws-cdk/assertions"],"labels":["@aws-cdk/assertions"],"assignees":["kaizen3031593"]},
2828
{"area":"@aws-cdk/assets","keywords":["assets","staging"],"labels":["@aws-cdk/assets"],"assignees":["eladb"]},
2929
{"area":"@aws-cdk/aws-accessanalyzer","keywords":["aws-accessanalyzer","accessanalyzer","cfnanalyzer"],"labels":["@aws-cdk/aws-accessanalyzer"],"assignees":["skinny85"]},
3030
{"area":"@aws-cdk/aws-acmpca","keywords":["aws-acmpca","acmpca","certificateauthority"],"labels":["@aws-cdk/aws-acmpca"],"assignees":["skinny85"]},

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
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.136.0](https://github.com/aws/aws-cdk/compare/v1.135.0...v1.136.0) (2021-12-15)
6+
7+
8+
### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
9+
10+
* **appsync:** The `CachingConfig#ttl` property is now required.
11+
12+
[1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-cachingconfig.html#cfn-appsync-resolver-cachingconfig-ttl
13+
* **glue:** the grantRead API previously included 'glue:BatchDeletePartition', and now it does not.
14+
15+
16+
17+
18+
### Features
19+
20+
* **amplify:** Add Amplify asset deployment resource ([#16922](https://github.com/aws/aws-cdk/issues/16922)) ([499ba85](https://github.com/aws/aws-cdk/commit/499ba857e75aa54aa90606f22b984692c8271152)), closes [#16208](https://github.com/aws/aws-cdk/issues/16208)
21+
* **apigateway:** add option to set the base path when adding a domain name to a Rest API ([#17915](https://github.com/aws/aws-cdk/issues/17915)) ([9af5b4d](https://github.com/aws/aws-cdk/commit/9af5b4dba57e816754673fc11a1246d6d4215c5e))
22+
* **apigatewayv2:** Lambda authorizer for WebSocket API ([#16886](https://github.com/aws/aws-cdk/issues/16886)) ([67cce37](https://github.com/aws/aws-cdk/commit/67cce37f8ea3e6096e44a926fe61441dfcbc685b)), closes [#13869](https://github.com/aws/aws-cdk/issues/13869)
23+
* **aws-applicationautoscaling:** Allow autoscaling with "M out of N" datapoints ([#17441](https://github.com/aws/aws-cdk/issues/17441)) ([c21320d](https://github.com/aws/aws-cdk/commit/c21320d32a22b9bd5f202acbdd2626ba4d90fbca)), closes [#17433](https://github.com/aws/aws-cdk/issues/17433)
24+
* **aws-applicationautoscaling:** enabling autoscaling for ElastiCache Redis cluster ([#17919](https://github.com/aws/aws-cdk/issues/17919)) ([7f54ed6](https://github.com/aws/aws-cdk/commit/7f54ed667607025666c714299036a6ca770065c9))
25+
* **aws-ecs:** expose environment from containerDefinition ([#17889](https://github.com/aws/aws-cdk/issues/17889)) ([4937cd0](https://github.com/aws/aws-cdk/commit/4937cd0d0057d7d389809f4c4ef56fc6020a954f)), closes [#17867](https://github.com/aws/aws-cdk/issues/17867)
26+
* **aws-s3:** add support for BucketOwnerEnforced to S3 ObjectOwnershipType ([#17961](https://github.com/aws/aws-cdk/issues/17961)) ([93fafc5](https://github.com/aws/aws-cdk/commit/93fafc5c93f0a8a0a05f4c261df3918256f71e5e)), closes [#17926](https://github.com/aws/aws-cdk/issues/17926)
27+
* **cfnspec:** cloudformation spec v51.0.0 ([#17955](https://github.com/aws/aws-cdk/issues/17955)) ([c6b7a49](https://github.com/aws/aws-cdk/commit/c6b7a496122ef2e03ccc267e2cccf03ab439fdc7)), closes [#17943](https://github.com/aws/aws-cdk/issues/17943)
28+
* **cli:** Hotswapping Support for S3 Bucket Deployments ([#17638](https://github.com/aws/aws-cdk/issues/17638)) ([1df478b](https://github.com/aws/aws-cdk/commit/1df478b9777afcdb5401df6c4a1a9708849dca42))
29+
* **codecommit:** allow initializing a Repository with contents ([#17968](https://github.com/aws/aws-cdk/issues/17968)) ([54b6cc6](https://github.com/aws/aws-cdk/commit/54b6cc677f2b1c0ffd6a183fe6b935ad1012cf63)), closes [#17967](https://github.com/aws/aws-cdk/issues/17967) [#16958](https://github.com/aws/aws-cdk/issues/16958)
30+
* **ec2:** add d3 and d3en instances ([#17782](https://github.com/aws/aws-cdk/issues/17782)) ([8b52196](https://github.com/aws/aws-cdk/commit/8b52196d9971f0925acedf067150e1c465be7a1e)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2)
31+
* **ec2:** add high memory instances u-6tb1, u-9tb1, u-12tb1, u-18tb1, and u-24tb1 ([#17964](https://github.com/aws/aws-cdk/issues/17964)) ([5497525](https://github.com/aws/aws-cdk/commit/54975259fc2425e43cbdcb99f82341d7c0d0aa47))
32+
* **ec2:** add im4gn and is4gen instances ([#17780](https://github.com/aws/aws-cdk/issues/17780)) ([e057c8f](https://github.com/aws/aws-cdk/commit/e057c8fffd32d5e0ad70880f96a2adc5e1b28eea)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/cfn-ec2)
33+
* **iotevents:** add IoT Events input L2 Construct ([#17847](https://github.com/aws/aws-cdk/issues/17847)) ([9f03dc4](https://github.com/aws/aws-cdk/commit/9f03dc4c5b75225942037fb6c8fa7d6abf35fe11)), closes [/github.com/aws/aws-cdk/issues/17711#issuecomment-986153267](https://github.com/aws//github.com/aws/aws-cdk/issues/17711/issues/issuecomment-986153267)
34+
* **lambda:** add cloudwatch lambda insights arm support ([#17665](https://github.com/aws/aws-cdk/issues/17665)) ([02749b4](https://github.com/aws/aws-cdk/commit/02749b43d5169b973e543100c5a7b0c2df04ce2b)), closes [#17133](https://github.com/aws/aws-cdk/issues/17133)
35+
36+
37+
### Bug Fixes
38+
39+
* **appmesh:** adding support with gateway route priority ([#17694](https://github.com/aws/aws-cdk/issues/17694)) ([a61576f](https://github.com/aws/aws-cdk/commit/a61576fd43fdcca44e364fc6bfa017c8aef3fc07)), closes [#16821](https://github.com/aws/aws-cdk/issues/16821)
40+
* **appsync:** `ttl` property of `CachingConfig` is not required ([#17981](https://github.com/aws/aws-cdk/issues/17981)) ([73e5fec](https://github.com/aws/aws-cdk/commit/73e5fec36cb149cf666320afbe63308c968c62dd))
41+
* **aws-autoscaling:** notificationTargetArn should be optional in LifecycleHook ([#16187](https://github.com/aws/aws-cdk/issues/16187)) ([4e7a275](https://github.com/aws/aws-cdk/commit/4e7a2758eec6999aee5432b3e9e6bbe7626a2d6b)), closes [#14641](https://github.com/aws/aws-cdk/issues/14641)
42+
* **aws-lambda-nodejs:** use closest lockfile when autodetecting ([#16629](https://github.com/aws/aws-cdk/issues/16629)) ([c4ecd96](https://github.com/aws/aws-cdk/commit/c4ecd9636087332d8ae9bc5e120d890e8c677f35)), closes [#15847](https://github.com/aws/aws-cdk/issues/15847) [40aws-cdk/aws-lambda-nodejs/lib/function.ts#L137-L139](https://github.com/40aws-cdk/aws-lambda-nodejs/lib/function.ts/issues/L137-L139) [/github.com/aws/aws-cdk/issues/15847#issuecomment-903830384](https://github.com/aws//github.com/aws/aws-cdk/issues/15847/issues/issuecomment-903830384)
43+
* **cli:** asset publishing broken cross account ([#18007](https://github.com/aws/aws-cdk/issues/18007)) ([2fc6895](https://github.com/aws/aws-cdk/commit/2fc68954cfbc3c65694e767b00a2318f9cc4a501)), closes [#17668](https://github.com/aws/aws-cdk/issues/17668) [#17988](https://github.com/aws/aws-cdk/issues/17988)
44+
* **cli:** hotswapping StateMachines with a name fails ([#17892](https://github.com/aws/aws-cdk/issues/17892)) ([de67aae](https://github.com/aws/aws-cdk/commit/de67aae18cfed2694e9002a10e739a56f294040f)), closes [#17716](https://github.com/aws/aws-cdk/issues/17716)
45+
* **custom-resources:** assumedRole from AwsCustomResource invocation leaked to next execution ([#15776](https://github.com/aws/aws-cdk/issues/15776)) ([e138188](https://github.com/aws/aws-cdk/commit/e13818854c89591606ac74496969b841f6a1fa8e)), closes [#15425](https://github.com/aws/aws-cdk/issues/15425)
46+
* **glue:** remove `batchDeletePartition` from `grantRead()` permissions ([#17941](https://github.com/aws/aws-cdk/issues/17941)) ([3d64f9b](https://github.com/aws/aws-cdk/commit/3d64f9b8c07e83d4a085e3eaf69629a866bc20d0)), closes [#17935](https://github.com/aws/aws-cdk/issues/17935) [#15116](https://github.com/aws/aws-cdk/issues/15116)
47+
* **logs:** log retention fails with OperationAbortedException ([#17688](https://github.com/aws/aws-cdk/issues/17688)) ([95b8da9](https://github.com/aws/aws-cdk/commit/95b8da94a1880d8c34cab80c9b484307260047d9)), closes [#17546](https://github.com/aws/aws-cdk/issues/17546)
48+
* **rds:** unable to use tokens as port in `DatabaseInstance` ([#17995](https://github.com/aws/aws-cdk/issues/17995)) ([0745193](https://github.com/aws/aws-cdk/commit/0745193e4c18ecb118ba3330a380f7474b527a2b)), closes [#17948](https://github.com/aws/aws-cdk/issues/17948)
49+
550
## [1.135.0](https://github.com/aws/aws-cdk/compare/v1.134.0...v1.135.0) (2021-12-10)
651

752

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ export abstract class RestApiBase extends Resource implements IRestApi {
319319
private _latestDeployment?: Deployment;
320320
private _domainName?: DomainName;
321321

322+
protected cloudWatchAccount?: CfnAccount;
323+
322324
constructor(scope: Construct, id: string, props: RestApiBaseProps = { }) {
323325
super(scope, id);
324326
this.restApiName = props.restApiName ?? id;
@@ -500,6 +502,17 @@ export abstract class RestApiBase extends Resource implements IRestApi {
500502
ignore(deployment);
501503
}
502504

505+
/**
506+
* Associates a Stage with this REST API
507+
*
508+
* @internal
509+
*/
510+
public _attachStage(stage: Stage) {
511+
if (this.cloudWatchAccount) {
512+
stage.node.addDependency(this.cloudWatchAccount);
513+
}
514+
}
515+
503516
/**
504517
* @internal
505518
*/
@@ -509,11 +522,11 @@ export abstract class RestApiBase extends Resource implements IRestApi {
509522
managedPolicies: [iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AmazonAPIGatewayPushToCloudWatchLogs')],
510523
});
511524

512-
const resource = new CfnAccount(this, 'Account', {
525+
this.cloudWatchAccount = new CfnAccount(this, 'Account', {
513526
cloudWatchRoleArn: role.roleArn,
514527
});
515528

516-
resource.node.addDependency(apiResource);
529+
this.cloudWatchAccount.node.addDependency(apiResource);
517530
}
518531

519532
/**

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Construct } from 'constructs';
33
import { AccessLogFormat, IAccessLogDestination } from './access-log';
44
import { CfnStage } from './apigateway.generated';
55
import { Deployment } from './deployment';
6-
import { IRestApi } from './restapi';
6+
import { IRestApi, RestApiBase } from './restapi';
77
import { parseMethodOptionsPath } from './util';
88

99
/**
@@ -256,6 +256,10 @@ export class Stage extends Resource implements IStage {
256256

257257
this.stageName = resource.ref;
258258
this.restApi = props.deployment.api;
259+
260+
if (RestApiBase._isRestApiBase(this.restApi)) {
261+
this.restApi._attachStage(this);
262+
}
259263
}
260264

261265
/**

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
"myauthorizer23CB99DD": {
3535
"Type": "AWS::ApiGateway::Authorizer",
3636
"Properties": {
37+
"Name": "CognitoUserPoolsAuthorizerIntegmyauthorizer10C804C1",
3738
"RestApiId": {
3839
"Ref": "myrestapi551C8392"
3940
},
4041
"Type": "COGNITO_USER_POOLS",
4142
"IdentitySource": "method.request.header.Authorization",
42-
"Name": "CognitoUserPoolsAuthorizerIntegmyauthorizer10C804C1",
4343
"ProviderARNs": [
4444
{
4545
"Fn::GetAtt": [
@@ -123,7 +123,10 @@
123123
"Ref": "myrestapiDeployment419B1464b903292b53d7532ca4296973bcb95b1a"
124124
},
125125
"StageName": "prod"
126-
}
126+
},
127+
"DependsOn": [
128+
"myrestapiAccountA49A05BE"
129+
]
127130
},
128131
"myrestapiANY94B0497F": {
129132
"Type": "AWS::ApiGateway::Method",

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@
198198
"Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb"
199199
},
200200
"StageName": "prod"
201-
}
201+
},
202+
"DependsOn": [
203+
"MyRestApiAccount2FB6DB7A"
204+
]
202205
},
203206
"MyRestApiANY05143F93": {
204207
"Type": "AWS::ApiGateway::Method",
@@ -239,6 +242,7 @@
239242
"MyAuthorizer6575980E": {
240243
"Type": "AWS::ApiGateway::Authorizer",
241244
"Properties": {
245+
"Name": "RequestAuthorizerIntegMyAuthorizer5D9D41C5",
242246
"RestApiId": {
243247
"Ref": "MyRestApi2D1F47A9"
244248
},
@@ -266,8 +270,7 @@
266270
]
267271
]
268272
},
269-
"IdentitySource": "method.request.header.Authorization,method.request.querystring.allow",
270-
"Name": "RequestAuthorizerIntegMyAuthorizer5D9D41C5"
273+
"IdentitySource": "method.request.header.Authorization,method.request.querystring.allow"
271274
}
272275
}
273276
},

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
"MyAuthorizer6575980E": {
106106
"Type": "AWS::ApiGateway::Authorizer",
107107
"Properties": {
108+
"Name": "TokenAuthorizerIAMRoleIntegMyAuthorizer1DFDE3B5",
108109
"RestApiId": {
109110
"Ref": "MyRestApi2D1F47A9"
110111
},
@@ -138,8 +139,7 @@
138139
]
139140
]
140141
},
141-
"IdentitySource": "method.request.header.Authorization",
142-
"Name": "TokenAuthorizerIAMRoleIntegMyAuthorizer1DFDE3B5"
142+
"IdentitySource": "method.request.header.Authorization"
143143
}
144144
},
145145
"MyAuthorizerauthorizerInvokePolicy0F88B8E1": {
@@ -241,7 +241,10 @@
241241
"Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb"
242242
},
243243
"StageName": "prod"
244-
}
244+
},
245+
"DependsOn": [
246+
"MyRestApiAccount2FB6DB7A"
247+
]
245248
},
246249
"MyRestApiANY05143F93": {
247250
"Type": "AWS::ApiGateway::Method",

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@
198198
"Ref": "MyRestApiDeploymentB555B582dcff966d69deeda8d47e3bf409ce29cb"
199199
},
200200
"StageName": "prod"
201-
}
201+
},
202+
"DependsOn": [
203+
"MyRestApiAccount2FB6DB7A"
204+
]
202205
},
203206
"MyRestApiANY05143F93": {
204207
"Type": "AWS::ApiGateway::Method",
@@ -239,6 +242,7 @@
239242
"MyAuthorizer6575980E": {
240243
"Type": "AWS::ApiGateway::Authorizer",
241244
"Properties": {
245+
"Name": "TokenAuthorizerIntegMyAuthorizer793B1D5F",
242246
"RestApiId": {
243247
"Ref": "MyRestApi2D1F47A9"
244248
},
@@ -266,8 +270,7 @@
266270
]
267271
]
268272
},
269-
"IdentitySource": "method.request.header.Authorization",
270-
"Name": "TokenAuthorizerIntegMyAuthorizer793B1D5F"
273+
"IdentitySource": "method.request.header.Authorization"
271274
}
272275
}
273276
},

packages/@aws-cdk/aws-apigateway/test/integ.cors.expected.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@
7777
"Ref": "corsapitestDeployment2BF1633A228079ea05e5799220dd4ca13512b92d"
7878
},
7979
"StageName": "prod"
80-
}
80+
},
81+
"DependsOn": [
82+
"corsapitestAccount7D1D6854"
83+
]
8184
},
8285
"corsapitesttwitch0E3D1559": {
8386
"Type": "AWS::ApiGateway::Resource",

packages/@aws-cdk/aws-apigateway/test/integ.lambda-api.latebound-deploymentstage.expected.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,10 @@
377377
"Ref": "deployment3338197541aef5f15bf9a60b10e06fdbe72854f4"
378378
},
379379
"StageName": "prod"
380-
}
380+
},
381+
"DependsOn": [
382+
"lambdarestapiAccount856938D8"
383+
]
381384
}
382385
}
383386
}

0 commit comments

Comments
 (0)