Skip to content

Commit abfff4b

Browse files
Merge remote-tracking branch 'origin/master'
* origin/master: (74 commits) chore: remove reliance on `decdk` in build system (aws#18760) chore: add repository directory for all packages.json (aws#17203) docs(ecs): correct comment documentation for NetworkMode (aws#17841) feat(ecs): expose image name in container definition (aws#17793) feat(ecr): add server-side encryption configuration (aws#16966) chore(region-info): ap-southeast-3 (Jakarta) ROUTE_53_BUCKET_WEBSITE_ZONE_ID (aws#18110) chore: reassign njlynch's ownership areas (aws#18751) chore(ecs-service-extensions): migrate tests to assertions (aws#18649) chore(s3): Fixed documentation for `InventoryFormat.ORC` (aws#18717) feat(iot): add Action to republish MQTT messages to another MQTT topic (aws#18661) chore(rds): add support for PostgreSQL 14 (aws#18713) fix(core): correctly reference versionless secure parameters (aws#18730) fix(ec2): `UserData.addSignalOnExitCommand` does not work in combination with `userDataCausesReplacement` (aws#18726) fix(vpc): Vpc.fromLookup should throw if subnet group name tag is explicitly given and does not exist (aws#18714) docs(dynamodb): add note around table encryption (aws#18721) chore: override `markdown-it` version (aws#18723) docs(cfnspec): update CloudFormation documentation (aws#18741) chore(release): 1.142.0 chore(lambda-layer-awscli): contains a CLI version with a CVE (aws#18727) chore(lambda-python): remove Pillow dependency (aws#18722) ...
2 parents 5ba881b + 49badb5 commit abfff4b

File tree

710 files changed

+9779
-4166
lines changed

Some content is hidden

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

710 files changed

+9779
-4166
lines changed

Diff for: .github/workflows/issue-label-assign.yml

+87-46
Large diffs are not rendered by default.

Diff for: CHANGELOG.md

+57
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,63 @@
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.142.0](https://github.com/aws/aws-cdk/compare/v1.141.0...v1.142.0) (2022-01-28)
6+
7+
8+
### Features
9+
10+
* **cfnspec:** cloudformation spec v53.1.0 ([#18680](https://github.com/aws/aws-cdk/issues/18680)) ([f385059](https://github.com/aws/aws-cdk/commit/f38505911a3e140a9cb6b269bdf22abe9803c515))
11+
* **cloudfront-origins:** extend `readTimeout` maximum value for `HttpOriginProps` ([#18697](https://github.com/aws/aws-cdk/issues/18697)) ([e64de67](https://github.com/aws/aws-cdk/commit/e64de677cdfc014f68e92b204f4728e60a8bb111)), closes [#18628](https://github.com/aws/aws-cdk/issues/18628)
12+
* **eks:** cluster logging ([#18112](https://github.com/aws/aws-cdk/issues/18112)) ([872277b](https://github.com/aws/aws-cdk/commit/872277b9e853dbf5f2cac84b5afb6d26e0ed5659)), closes [#4159](https://github.com/aws/aws-cdk/issues/4159)
13+
* **iotevents:** allow setting description, evaluation method and key of DetectorModel ([#18644](https://github.com/aws/aws-cdk/issues/18644)) ([2eeaebc](https://github.com/aws/aws-cdk/commit/2eeaebc3cdc9c5c7ef3fa312b3d1abca265dcbb6))
14+
* **lambda-python:** support setting environment vars for bundling ([#18635](https://github.com/aws/aws-cdk/issues/18635)) ([30e2233](https://github.com/aws/aws-cdk/commit/30e223333fef0b0d7f12287dab170a34e092d7fa))
15+
16+
17+
### Bug Fixes
18+
19+
* **aws-lambda-nodejs:** pre compilation with tsc is not being run ([#18062](https://github.com/aws/aws-cdk/issues/18062)) ([7ac7221](https://github.com/aws/aws-cdk/commit/7ac7221aff3c612ab80e7812c371b11c56e5db0a)), closes [#18002](https://github.com/aws/aws-cdk/issues/18002)
20+
* **pipelines:** undeployable due to dependency cycle ([#18686](https://github.com/aws/aws-cdk/issues/18686)) ([009d689](https://github.com/aws/aws-cdk/commit/009d68912267de9dcf4136a7d80a652a891b7bb9)), closes [#18492](https://github.com/aws/aws-cdk/issues/18492) [#18673](https://github.com/aws/aws-cdk/issues/18673)
21+
22+
## [1.141.0](https://github.com/aws/aws-cdk/compare/v1.140.0...v1.141.0) (2022-01-27)
23+
24+
25+
### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES
26+
27+
* **servicecatalog:** `TagOptions` now have `scope` and `props` argument in constructor, and data is now passed via a `allowedValueForTags` field in props
28+
29+
### Features
30+
31+
* **assertions:** support assertions on stack messages ([#18521](https://github.com/aws/aws-cdk/issues/18521)) ([cb86e30](https://github.com/aws/aws-cdk/commit/cb86e30391aefdda13e6b0d4b3be2fedf76477c8)), closes [#18347](https://github.com/aws/aws-cdk/issues/18347)
32+
* **assertions:** support for conditions ([#18577](https://github.com/aws/aws-cdk/issues/18577)) ([55ff1b2](https://github.com/aws/aws-cdk/commit/55ff1b2e69f1b42bbbecd9dc95e17f2ffc35f94e)), closes [#18560](https://github.com/aws/aws-cdk/issues/18560)
33+
* **aws-ecs-patterns:** adding support for custom HealthCheck while creating QueueProcessingFargateService ([#18219](https://github.com/aws/aws-cdk/issues/18219)) ([0ca81a1](https://github.com/aws/aws-cdk/commit/0ca81a118d3d54b87d2d05a53fb72e4efe03b591)), closes [#15636](https://github.com/aws/aws-cdk/issues/15636)
34+
* **certificatemanager:** DnsValidatedCertificate DNS record cleanup ([#18311](https://github.com/aws/aws-cdk/issues/18311)) ([36d356d](https://github.com/aws/aws-cdk/commit/36d356d0b3e422f7451f4b0dd2f971aa0378210e)), closes [#3333](https://github.com/aws/aws-cdk/issues/3333) [#7063](https://github.com/aws/aws-cdk/issues/7063)
35+
* **cfnspec:** cloudformation spec v53.1.0 ([#18588](https://github.com/aws/aws-cdk/issues/18588)) ([a283a48](https://github.com/aws/aws-cdk/commit/a283a482dead64e94383ba21cc7908f10c4459a2))
36+
* **cfnspec:** cloudformation spec v53.1.0 ([#18658](https://github.com/aws/aws-cdk/issues/18658)) ([2eda19e](https://github.com/aws/aws-cdk/commit/2eda19e510374426190531810cff518d582644ad))
37+
* **ec2:** session timeout and login banner for client vpn endpoint ([#18590](https://github.com/aws/aws-cdk/issues/18590)) ([7294118](https://github.com/aws/aws-cdk/commit/72941180a7188e5560a58f1509554ef038544ec4))
38+
* **ecs:** add `BaseService.fromServiceArnWithCluster()` for use in CodePipeline ([#18530](https://github.com/aws/aws-cdk/issues/18530)) ([3d192a9](https://github.com/aws/aws-cdk/commit/3d192a9a832857cb246d719a68b4b8f40d807fed))
39+
* **iotevents:** add DetectorModel L2 Construct ([#18049](https://github.com/aws/aws-cdk/issues/18049)) ([d0960f1](https://github.com/aws/aws-cdk/commit/d0960f181e5f66daa1eb53be2190b7e62bd66030)), closes [#17711](https://github.com/aws/aws-cdk/issues/17711) [#17711](https://github.com/aws/aws-cdk/issues/17711)
40+
* **lambda-nodejs:** Allow setting mainFields for esbuild ([#18569](https://github.com/aws/aws-cdk/issues/18569)) ([0e78aeb](https://github.com/aws/aws-cdk/commit/0e78aeb9ad62226e67f72f23c0008ba749b3a73b))
41+
* **s3:** custom role for the bucket notifications handler ([#17794](https://github.com/aws/aws-cdk/issues/17794)) ([43f232d](https://github.com/aws/aws-cdk/commit/43f232ddc0a18e9a2fada2fbead758ab3538adc2)), closes [#9918](https://github.com/aws/aws-cdk/issues/9918) [#13241](https://github.com/aws/aws-cdk/issues/13241)
42+
* **servicecatalog:** Create TagOptions Construct ([#18314](https://github.com/aws/aws-cdk/issues/18314)) ([903c4b6](https://github.com/aws/aws-cdk/commit/903c4b6e4adf676fae42265a048dddd0e1386542)), closes [#17753](https://github.com/aws/aws-cdk/issues/17753)
43+
44+
45+
### Bug Fixes
46+
47+
* **apigatewayv2:** websocket api: allow all methods in grant manage connections ([#18544](https://github.com/aws/aws-cdk/issues/18544)) ([41c8a3f](https://github.com/aws/aws-cdk/commit/41c8a3fa6b50a94affb65286d862056050d02e84)), closes [#18410](https://github.com/aws/aws-cdk/issues/18410)
48+
* **aws-apigateway:** cross region authorizer ref ([#18444](https://github.com/aws/aws-cdk/issues/18444)) ([0e0a092](https://github.com/aws/aws-cdk/commit/0e0a0922ba1d538abdfeb61a260c262109115038))
49+
* **cli:** hotswap should wait for lambda's `updateFunctionCode` to complete ([#18536](https://github.com/aws/aws-cdk/issues/18536)) ([0e08eeb](https://github.com/aws/aws-cdk/commit/0e08eebd2f13ab0da6cac7b91288845cad530192)), closes [#18386](https://github.com/aws/aws-cdk/issues/18386) [#18386](https://github.com/aws/aws-cdk/issues/18386)
50+
* **ecs:** only works in 'aws' partition ([#18496](https://github.com/aws/aws-cdk/issues/18496)) ([525ac07](https://github.com/aws/aws-cdk/commit/525ac07369e33e2f36b7a0eea7913e43649484db)), closes [#18429](https://github.com/aws/aws-cdk/issues/18429)
51+
* **ecs-patterns:** Fix Network Load Balancer Port assignments in ECS Patterns ([#18157](https://github.com/aws/aws-cdk/issues/18157)) ([1393729](https://github.com/aws/aws-cdk/commit/13937299596d0b858d56e9116bf7a7dbe039d4b4)), closes [#18073](https://github.com/aws/aws-cdk/issues/18073)
52+
* **elasticloadbalancingv2:** ApplicationLoadBalancer.logAccessLogs does not grant all necessary permissions ([#18558](https://github.com/aws/aws-cdk/issues/18558)) ([bde1795](https://github.com/aws/aws-cdk/commit/bde17950293309b7449fc412301634770b47111f)), closes [#18367](https://github.com/aws/aws-cdk/issues/18367)
53+
* **pipelines:** CodeBuild projects are hard to tell apart ([#18492](https://github.com/aws/aws-cdk/issues/18492)) ([f6dab8d](https://github.com/aws/aws-cdk/commit/f6dab8d8c5aa4cf56d6846e2d13c1d5641136f72))
54+
* **region-info:** incorrect codedeploy service principals ([#18505](https://github.com/aws/aws-cdk/issues/18505)) ([16db963](https://github.com/aws/aws-cdk/commit/16db9639e86f1fd6f26a1054f4d6df24801d0f05))
55+
* **route53:** add RoutingControlArn to HealthCheck patch ([#18645](https://github.com/aws/aws-cdk/issues/18645)) ([c58e8bb](https://github.com/aws/aws-cdk/commit/c58e8bbbcb0a66c37b65cddc1da8d19dfbf26b4f)), closes [#18570](https://github.com/aws/aws-cdk/issues/18570)
56+
* **s3:** add missing safe actions to `grantWrite`, `grantReadWrite` and `grantPut` methods ([#18494](https://github.com/aws/aws-cdk/issues/18494)) ([940d043](https://github.com/aws/aws-cdk/commit/940d0439cd347f06d755f3e3dd0582470749f710)), closes [#13616](https://github.com/aws/aws-cdk/issues/13616)
57+
* **secretsmanager:** SecretRotation for secret imported by name has incorrect permissions ([#18567](https://github.com/aws/aws-cdk/issues/18567)) ([9ed263c](https://github.com/aws/aws-cdk/commit/9ed263cde0b41959ff267720c0978bfe7449337a)), closes [#18424](https://github.com/aws/aws-cdk/issues/18424)
58+
* **stepfunctions:** task token integration cannot be used with API Gateway ([#18595](https://github.com/aws/aws-cdk/issues/18595)) ([678eede](https://github.com/aws/aws-cdk/commit/678eeded5d5631dbacff43ead697ecbd3bd4b27d)), closes [#14184](https://github.com/aws/aws-cdk/issues/14184) [#14181](https://github.com/aws/aws-cdk/issues/14181)
59+
* **stepfunctions-tasks:** cluster creation fails with unresolved release labels ([#18288](https://github.com/aws/aws-cdk/issues/18288)) ([9940952](https://github.com/aws/aws-cdk/commit/9940952d67bdf07f3d737dc88676dc7f7c435a12))
60+
* **synthetics:** correct getbucketlocation policy ([#13573](https://github.com/aws/aws-cdk/issues/13573)) ([e743525](https://github.com/aws/aws-cdk/commit/e743525b6379371110d737bb360f637c41d30ca1)), closes [#13572](https://github.com/aws/aws-cdk/issues/13572)
61+
562
## [1.140.0](https://github.com/aws/aws-cdk/compare/v1.139.0...v1.140.0) (2022-01-20)
663

764

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
},
3333
"resolutions": {
3434
"colors": "1.4.0",
35-
"string-width": "^4.2.3"
35+
"string-width": "^4.2.3",
36+
"markdown-it": "^12.3.2"
3637
},
3738
"repository": {
3839
"type": "git",

Diff for: packages/@aws-cdk-containers/ecs-service-extensions/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@aws-cdk/cfn2ts": "0.0.0",
4545
"jest": "^27.4.7",
4646
"@aws-cdk/pkglint": "0.0.0",
47-
"@aws-cdk/assert-internal": "0.0.0"
47+
"@aws-cdk/assertions": "0.0.0"
4848
},
4949
"dependencies": {
5050
"@aws-cdk/aws-applicationautoscaling": "0.0.0",

Diff for: packages/@aws-cdk-containers/ecs-service-extensions/test/appmesh.test.ts

+9-25
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Match, Template } from '@aws-cdk/assertions';
22
import * as appmesh from '@aws-cdk/aws-appmesh';
33
import * as ecs from '@aws-cdk/aws-ecs';
44
import * as cdk from '@aws-cdk/core';
@@ -34,7 +34,7 @@ describe('appmesh', () => {
3434

3535
// THEN
3636
// Ensure that task has an App Mesh sidecar
37-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
37+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
3838
ContainerDefinitions: [
3939
{
4040
Cpu: 256,
@@ -210,7 +210,7 @@ describe('appmesh', () => {
210210
});
211211

212212
// Ensure that the service has the right settings
213-
expect(stack).toHaveResource('AWS::ECS::Service', {
213+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
214214
Cluster: {
215215
Ref: 'productionenvironmentclusterC6599D2D',
216216
},
@@ -256,8 +256,6 @@ describe('appmesh', () => {
256256
Ref: 'myservicetaskdefinitionF3E2D86F',
257257
},
258258
});
259-
260-
261259
});
262260

263261
test('should have the right maximumPercentage at desired count == 1', () => {
@@ -288,15 +286,13 @@ describe('appmesh', () => {
288286
desiredCount: 1,
289287
});
290288

291-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
289+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
292290
DeploymentConfiguration: {
293291
MaximumPercent: 200,
294292
MinimumHealthyPercent: 100,
295293
},
296294
DesiredCount: 1,
297295
});
298-
299-
300296
});
301297

302298
test('should have the right maximumPercentage at desired count == 2', () => {
@@ -327,15 +323,13 @@ describe('appmesh', () => {
327323
desiredCount: 2,
328324
});
329325

330-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
326+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
331327
DeploymentConfiguration: {
332328
MaximumPercent: 150,
333329
MinimumHealthyPercent: 100,
334330
},
335331
DesiredCount: 2,
336332
});
337-
338-
339333
});
340334

341335
test('should have the right maximumPercentage at desired count == 3', () => {
@@ -366,15 +360,13 @@ describe('appmesh', () => {
366360
desiredCount: 3,
367361
});
368362

369-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
363+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
370364
DeploymentConfiguration: {
371365
MaximumPercent: 150,
372366
MinimumHealthyPercent: 100,
373367
},
374368
DesiredCount: 3,
375369
});
376-
377-
378370
});
379371

380372
test('should have the right maximumPercentage at desired count == 4', () => {
@@ -405,15 +397,13 @@ describe('appmesh', () => {
405397
desiredCount: 4,
406398
});
407399

408-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
400+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
409401
DeploymentConfiguration: {
410402
MaximumPercent: 125,
411403
MinimumHealthyPercent: 100,
412404
},
413405
DesiredCount: 4,
414406
});
415-
416-
417407
});
418408

419409
test('should have the right maximumPercentage at desired count > 4', () => {
@@ -444,15 +434,13 @@ describe('appmesh', () => {
444434
desiredCount: 8,
445435
});
446436

447-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
437+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
448438
DeploymentConfiguration: {
449439
MaximumPercent: 125,
450440
MinimumHealthyPercent: 100,
451441
},
452442
DesiredCount: 8,
453443
});
454-
455-
456444
});
457445

458446
test('should be able to create multiple App Mesh enabled services and connect', () => {
@@ -516,9 +504,7 @@ describe('appmesh', () => {
516504
greeterService.connectTo(greetingService);
517505

518506
// THEN
519-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition');
520-
521-
507+
Template.fromStack(stack).hasResource('AWS::ECS::TaskDefinition', Match.anyValue());
522508
});
523509

524510
test('should detect when attempting to connect services from two different envs', () => {
@@ -572,7 +558,5 @@ describe('appmesh', () => {
572558
expect(() => {
573559
developmentNameService.connectTo(productionNameService);
574560
}).toThrow(/Unable to connect service 'name-development' in environment 'development' to service 'name-production' in environment 'production' because services can not be connected across environment boundaries/);
575-
576-
577561
});
578562
});

Diff for: packages/@aws-cdk-containers/ecs-service-extensions/test/assign-public-ip.test.ts

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as autoscaling from '@aws-cdk/aws-autoscaling';
33
import * as ec2 from '@aws-cdk/aws-ec2';
44
import * as ecs from '@aws-cdk/aws-ecs';
@@ -29,15 +29,13 @@ describe('assign public ip', () => {
2929
});
3030

3131
// THEN
32-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
32+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
3333
NetworkConfiguration: {
3434
AwsvpcConfiguration: {
3535
AssignPublicIp: 'ENABLED',
3636
},
3737
},
3838
});
39-
40-
4139
});
4240

4341
test('errors when adding a public ip to ec2-backed service', () => {
@@ -76,8 +74,6 @@ describe('assign public ip', () => {
7674
serviceDescription,
7775
});
7876
}).toThrow(/Fargate/i);
79-
80-
8177
});
8278

8379
test('should not add a task record manager by default', () => {
@@ -103,8 +99,6 @@ describe('assign public ip', () => {
10399

104100
// THEN
105101
expect(service.ecsService.node.tryFindChild('TaskRecordManager')).toBeUndefined();
106-
107-
108102
});
109103

110104
test('should add a task record manager when dns is requested', () => {
@@ -138,8 +132,6 @@ describe('assign public ip', () => {
138132

139133
// THEN
140134
expect(service.ecsService.node.tryFindChild('TaskRecordManager')).toBeDefined();
141-
142-
143135
});
144136

145137
test('task record manager listens for ecs events', () => {
@@ -172,7 +164,7 @@ describe('assign public ip', () => {
172164
});
173165

174166
// THEN
175-
expect(stack).toHaveResourceLike('AWS::Events::Rule', {
167+
Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
176168
EventPattern: {
177169
'source': ['aws.ecs'],
178170
'detail-type': [
@@ -185,7 +177,7 @@ describe('assign public ip', () => {
185177
},
186178
});
187179

188-
expect(stack).toHaveResourceLike('AWS::Events::Rule', {
180+
Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
189181
EventPattern: {
190182
'source': ['aws.ecs'],
191183
'detail-type': [
@@ -197,7 +189,5 @@ describe('assign public ip', () => {
197189
},
198190
},
199191
});
200-
201-
202192
});
203193
});

Diff for: packages/@aws-cdk-containers/ecs-service-extensions/test/cloudwatch-agent.test.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as ecs from '@aws-cdk/aws-ecs';
33
import * as cdk from '@aws-cdk/core';
44
import { CloudwatchAgentExtension, Container, Environment, Service, ServiceDescription } from '../lib';
@@ -27,7 +27,7 @@ describe('cloudwatch agent', () => {
2727
});
2828

2929
// THEN
30-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
30+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
3131
ContainerDefinitions: [
3232
{
3333
Cpu: 256,
@@ -102,8 +102,5 @@ describe('cloudwatch agent', () => {
102102
],
103103
},
104104
});
105-
106-
107105
});
108-
109106
});

0 commit comments

Comments
 (0)