From 91767f03e76db8a63c18882b44854999b15aaff4 Mon Sep 17 00:00:00 2001 From: clueleaf <10379303+clueleaf@users.noreply.github.com> Date: Thu, 20 Oct 2022 02:02:32 +0900 Subject: [PATCH 1/8] feat(elbv2): add dropInvalidHeaderFields for elbv2 (#22466) Dropping invalid HTTP headers is recommended and also appears in Security Hub controls as [ELB.4](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-fsbp-controls.html#fsbp-elb-4) Attribute document: https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_LoadBalancerAttribute.html ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/alb/application-load-balancer.ts | 9 +++++++++ .../test/alb/load-balancer.test.ts | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts index 10291f2369849..320f63ef5a2e2 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts @@ -43,6 +43,14 @@ export interface ApplicationLoadBalancerProps extends BaseLoadBalancerProps { * @default 60 */ readonly idleTimeout?: Duration; + + /** + * Indicates whether HTTP headers with invalid header fields are removed + * by the load balancer (true) or routed to targets (false) + * + * @default false + */ + readonly dropInvalidHeaderFields?: boolean; } /** @@ -100,6 +108,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic if (props.http2Enabled === false) { this.setAttribute('routing.http2.enabled', 'false'); } if (props.idleTimeout !== undefined) { this.setAttribute('idle_timeout.timeout_seconds', props.idleTimeout.toSeconds().toString()); } + if (props.dropInvalidHeaderFields) {this.setAttribute('routing.http.drop_invalid_header_fields.enabled', 'true'); } } /** diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts index 61c8dc470545f..38e3ef46eea0b 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts @@ -81,6 +81,7 @@ describe('tests', () => { deletionProtection: true, http2Enabled: false, idleTimeout: cdk.Duration.seconds(1000), + dropInvalidHeaderFields: true, }); // THEN @@ -98,6 +99,10 @@ describe('tests', () => { Key: 'idle_timeout.timeout_seconds', Value: '1000', }, + { + Key: 'routing.http.drop_invalid_header_fields.enabled', + Value: 'true', + }, ], }); }); From c227f122cba25901e9cae334fd3e4b6261f7b34d Mon Sep 17 00:00:00 2001 From: Chris Garvis Date: Wed, 19 Oct 2022 14:20:13 -0400 Subject: [PATCH 2/8] chore(kinesis): update fact-tables with ap-southeast-3 firehouse CIDR blcok. (#22532) From: https://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html?using-iam-rs-vpc `108.136.221.64/27 for Asia Pacific (Jakarta)` --- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 2 +- .../test-stack.assets.json | 2 +- .../tree.json | 10 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 2 +- .../test-stack.assets.json | 2 +- .../tree.json | 10 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 2 +- .../test-stack.assets.json | 2 +- .../tree.json | 10 +- .../cdk.out | 2 +- ...efaultTestDeployAssertEF9A9A37.assets.json | 2 +- .../integ.json | 5 +- .../manifest.json | 2 +- ...namodbv2-put-item-action-stack.assets.json | 2 +- .../tree.json | 20 +-- .../cdk.out | 2 +- .../integ.json | 2 +- ...ot-republish-action-test-stack.assets.json | 2 +- .../manifest.json | 2 +- .../tree.json | 10 +- .../cdk.out | 2 +- .../integ.json | 5 +- ...-put-message-action-test-stack.assets.json | 2 +- ...efaultTestDeployAssertE216288D.assets.json | 2 +- .../manifest.json | 2 +- .../tree.json | 16 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 4 +- .../test-stack.assets.json | 6 +- .../test-stack.template.json | 3 + .../tree.json | 14 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 2 +- ...st-kinesis-stream-action-stack.assets.json | 2 +- .../tree.json | 14 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 2 +- .../test-stack.assets.json | 2 +- .../tree.json | 10 +- .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 2 +- .../test-stack.assets.json | 2 +- .../tree.json | 10 +- .../sns-topic-action.integ.snapshot/cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 2 +- .../sns-topic-action-test-stack.assets.json | 2 +- .../sns-topic-action.integ.snapshot/tree.json | 10 +- .../sqs-queue-action.integ.snapshot/cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 2 +- .../test-stack.assets.json | 2 +- .../sqs-queue-action.integ.snapshot/tree.json | 10 +- .../__entrypoint__.js | 118 -------------- .../__entrypoint__.js | 144 ++++++++++++++++++ .../index.d.ts | 0 .../index.js | 0 .../index.ts | 0 ...ivery-stream-s3-all-properties.assets.json | 12 +- ...ery-stream-s3-all-properties.template.json | 5 +- .../test/s3-bucket.lit.integ.snapshot/cdk.out | 2 +- .../s3-bucket.lit.integ.snapshot/integ.json | 2 +- .../manifest.json | 4 +- .../s3-bucket.lit.integ.snapshot/tree.json | 50 +++--- ...s-cdk-firehose-delivery-stream.assets.json | 6 +- ...cdk-firehose-delivery-stream.template.json | 3 + .../delivery-stream.integ.snapshot/cdk.out | 2 +- .../delivery-stream.integ.snapshot/integ.json | 2 +- .../manifest.json | 4 +- .../delivery-stream.integ.snapshot/tree.json | 14 +- ...-delivery-stream-source-stream.assets.json | 6 +- ...elivery-stream-source-stream.template.json | 3 + .../cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 4 +- .../tree.json | 18 +-- .../region-info/build-tools/fact-tables.ts | 1 + 87 files changed, 352 insertions(+), 311 deletions(-) delete mode 100644 packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/__entrypoint__.js create mode 100644 packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/__entrypoint__.js rename packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/{asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26 => asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d}/index.d.ts (100%) rename packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/{asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26 => asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d}/index.js (100%) rename packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/{asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26 => asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d}/index.ts (100%) diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/integ.json index 5174ffe048684..8e7324d0afcb8 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.cloudwatch-logs-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/manifest.json index c0750d980a97a..9c5f412c03a44 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/test-stack.assets.json index 48514f97d5294..0fa3363c55392 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/test-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "6361f157dda5565e3e68bcc7629aa6857a26345276dcc37f1104e134f9fe5bf1": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/tree.json index 477e558025258..96c25503cc186 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-logs-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "test-stack": { @@ -167,14 +167,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/integ.json index 19f9f3e9058f6..af1da9091dcfb 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.cloudwatch-put-metric-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/manifest.json index 724cc873d9725..71b1b66d1725f 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/test-stack.assets.json index c4edf186f74a8..ffdd69bd2e2ed 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/test-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "09580ede2fbe6bb0848068da17f72ced8c3d7b769dac7ad2eaf79451aa411f26": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/tree.json index 8689e4f7c3dbc..9cbd0c9e83044 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-put-metric-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "test-stack": { @@ -136,14 +136,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/integ.json index f6ee07d1abe7c..d0ff7ae092f8c 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.cloudwatch-set-alarm-state-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/manifest.json index b0af2b8f19757..d2ea739492793 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/test-stack.assets.json index 6c460d34e1430..d1ff711587105 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/test-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "ccf12c7d864bdaba979fe49500b1ca0966b975e1a33fe57b8523cb7ec07ec007": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/tree.json index 3332448633262..77e795ed8ba22 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/cloudwatch/cloudwatch-set-alarm-state-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "test-stack": { @@ -189,14 +189,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/dynamodbv2integtestDefaultTestDeployAssertEF9A9A37.assets.json b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/dynamodbv2integtestDefaultTestDeployAssertEF9A9A37.assets.json index 69278d209a6a6..e3f056d0af2e0 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/dynamodbv2integtestDefaultTestDeployAssertEF9A9A37.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/dynamodbv2integtestDefaultTestDeployAssertEF9A9A37.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/integ.json index f3004182535ca..5dbf561cb3575 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "dynamodbv2-integtest/DefaultTest": { "stacks": [ "test-dynamodbv2-put-item-action-stack" ], - "assertionStack": "dynamodbv2-integtest/DefaultTest/DeployAssert" + "assertionStack": "dynamodbv2-integtest/DefaultTest/DeployAssert", + "assertionStackName": "dynamodbv2integtestDefaultTestDeployAssertEF9A9A37" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/manifest.json index a2f625884fb8e..867f25e41f8d4 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/test-dynamodbv2-put-item-action-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/test-dynamodbv2-put-item-action-stack.assets.json index f8a7cee2b2d21..2753c896c2732 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/test-dynamodbv2-put-item-action-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/test-dynamodbv2-put-item-action-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "3d5ae52b69c9656b617087e12c3cbd7486ab8a18a0e5e927442d682ecc704529": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/tree.json index 48d5df2b3748c..7904c1c31a558 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/dynamodbv2/dynamodbv2-put-item-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "test-dynamodbv2-put-item-action-stack": { @@ -185,8 +185,8 @@ "id": "ScalingRole", "path": "test-dynamodbv2-put-item-action-stack/MyTable/ScalingRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" } } }, @@ -197,8 +197,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } }, "dynamodbv2-integtest": { @@ -214,15 +214,15 @@ "path": "dynamodbv2-integtest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "DeployAssert": { "id": "DeployAssert", "path": "dynamodbv2-integtest/DefaultTest/DeployAssert", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, @@ -239,8 +239,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/integ.json index 16e73ef31a32d..4f39046e85cfd 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.iot-republish-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/iot-republish-action-test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/iot-republish-action-test-stack.assets.json index e304a49ffcba8..257a3446258b5 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/iot-republish-action-test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/iot-republish-action-test-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "305c9fc874736995eb3f5e716c69ca33d448880fc9502324f8ac195078444310": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/manifest.json index dbab5bab58266..4cb645b36243f 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/tree.json index cb8701386788d..bb0dd3e8ead56 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iot-republish-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "iot-republish-action-test-stack": { @@ -133,14 +133,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/integ.json index 0cd2cd6fdff73..e6c39ec82093d 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "iotevents/DefaultTest": { "stacks": [ "iotevents-put-message-action-test-stack" ], - "assertionStack": "iotevents/DefaultTest/DeployAssert" + "assertionStack": "iotevents/DefaultTest/DeployAssert", + "assertionStackName": "ioteventsDefaultTestDeployAssertE216288D" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/iotevents-put-message-action-test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/iotevents-put-message-action-test-stack.assets.json index e04bdae49035f..b8bdee46b0d95 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/iotevents-put-message-action-test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/iotevents-put-message-action-test-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "cd0db44e940f2fdeff9e467d9fe0f2822733a56b6ab405747da5cf7a8ffca6b3": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/ioteventsDefaultTestDeployAssertE216288D.assets.json b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/ioteventsDefaultTestDeployAssertE216288D.assets.json index 73f51cec0ac1a..72ffb4dd7acf6 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/ioteventsDefaultTestDeployAssertE216288D.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/ioteventsDefaultTestDeployAssertE216288D.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/manifest.json index 89a3abbf02880..8872290d9b0f2 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/tree.json index 0fd6f7f5f6c3b..d014f95ee7ee9 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/iotevents-put-message-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "iotevents-put-message-action-test-stack": { @@ -330,8 +330,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } }, "iotevents": { @@ -347,15 +347,15 @@ "path": "iotevents/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "DeployAssert": { "id": "DeployAssert", "path": "iotevents/DefaultTest/DeployAssert", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, @@ -372,8 +372,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/integ.json index 8fdad4664dcf8..7a68f57b440d7 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.firehose-put-record-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/manifest.json index 31572e028a29e..c4b7ec86cebd8 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -23,7 +23,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/20f89831cfef3f9f62f3c3d8eac0ab1fb07f85c1f48c57fc850a2b28e7ad548e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ddaf82a99461f3117dfbf0a605c6a98fab96961d2031f4fd15e421c91fbb4dcd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/test-stack.assets.json index 0438d690d289b..1cf383d8e6011 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/test-stack.assets.json @@ -1,7 +1,7 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { - "20f89831cfef3f9f62f3c3d8eac0ab1fb07f85c1f48c57fc850a2b28e7ad548e": { + "ddaf82a99461f3117dfbf0a605c6a98fab96961d2031f4fd15e421c91fbb4dcd": { "source": { "path": "test-stack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "20f89831cfef3f9f62f3c3d8eac0ab1fb07f85c1f48c57fc850a2b28e7ad548e.json", + "objectKey": "ddaf82a99461f3117dfbf0a605c6a98fab96961d2031f4fd15e421c91fbb4dcd.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/test-stack.template.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/test-stack.template.json index 980c926d1867c..cb991d9303422 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/test-stack.template.json +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/test-stack.template.json @@ -254,6 +254,9 @@ "ap-southeast-2": { "FirehoseCidrBlock": "13.210.67.224/27" }, + "ap-southeast-3": { + "FirehoseCidrBlock": "108.136.221.64/27" + }, "ca-central-1": { "FirehoseCidrBlock": "35.183.92.128/27" }, diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/tree.json index fe2c80c64acdb..b1b643e76add3 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-firehose/firehose-put-record-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "test-stack": { @@ -419,20 +419,20 @@ "id": "@aws-cdk--aws-kinesisfirehose.CidrBlocks", "path": "test-stack/@aws-cdk--aws-kinesisfirehose.CidrBlocks", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnMapping", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/integ.json index b6b0af0be1136..e6eee8bfe58bb 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.kinesis-put-record-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/manifest.json index a8ebd398dee0d..a358f5830007b 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/test-kinesis-stream-action-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/test-kinesis-stream-action-stack.assets.json index 4e22cbe942539..731659084a3c4 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/test-kinesis-stream-action-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/test-kinesis-stream-action-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "ac064b75bdd497b1427d66c1cd1f8e97ccb3f7d87ed1e44833b559318c46ee6d": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/tree.json index 780053859e2b1..35b0203e8cde0 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/kinesis-stream/kinesis-put-record-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "test-kinesis-stream-action-stack": { @@ -182,20 +182,20 @@ "id": "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", "path": "test-kinesis-stream-action-stack/AwsCdkKinesisEncryptedStreamsUnsupportedRegions", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnCondition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/integ.json index 7265620a8db51..8f4dea5aa783f 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.lambda-function-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/manifest.json index da9baa7526f1e..10dfd9891a99e 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/test-stack.assets.json index 84e66710d777f..1c028a9bef42b 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/test-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "2b4a0434cdf98c3a863f12205b7823f10adfc8614638c58c3a473c52884df5cd": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/tree.json index eb8fbe9407194..bf6dfbf314425 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/lambda/lambda-function-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "test-stack": { @@ -170,14 +170,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/integ.json index 0cb875fe75e66..0e28dd3b08b37 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.s3-put-object-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/manifest.json index 2f05a8facb4c0..159c0c0b951ce 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/test-stack.assets.json index 1ecdf6586d7bc..3c943980f3191 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/test-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "a9f31cd36fb91f9ef983c81b14669fd727f93f70412e941a1991b9b3ead34d7b": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/tree.json index 4ced25eefc45f..696a1f445a10e 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/s3/s3-put-object-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "test-stack": { @@ -171,14 +171,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/integ.json index 4140768d25585..3010498a9de10 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.sns-topic-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/manifest.json index be454cfc3fb76..32c5774ec77b8 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/sns-topic-action-test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/sns-topic-action-test-stack.assets.json index 50a712435aa9b..9f14e43b06a42 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/sns-topic-action-test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/sns-topic-action-test-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "c87dc7ff1f88e0f178feb918626ae53eb35d18f402d021b67c8aa0c5d83db94c": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/tree.json index 52d404aaee5f3..e17828b5e040e 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/sns/sns-topic-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "sns-topic-action-test-stack": { @@ -158,14 +158,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/integ.json b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/integ.json index 57e2ab300e54f..b55a47dcd8ca8 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.sqs-queue-action": { "stacks": [ diff --git a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/manifest.json index 357baa74111d5..38cecd9202ada 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/test-stack.assets.json b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/test-stack.assets.json index 678910be078fb..b02ffd8da0c96 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/test-stack.assets.json +++ b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/test-stack.assets.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { "72460e658323afd590f716485fcab9cd19a5e3b276052aea5a91dda503a0fa06": { "source": { diff --git a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/tree.json b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/tree.json index 76f3fceb95118..82ca16448cd93 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-iot-actions/test/sqs/sqs-queue-action.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "test-stack": { @@ -161,14 +161,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/__entrypoint__.js b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/__entrypoint__.js deleted file mode 100644 index 9df94382cc74e..0000000000000 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/__entrypoint__.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = exports.external = void 0; -const https = require("https"); -const url = require("url"); -// for unit tests -exports.external = { - sendHttpRequest: defaultSendHttpRequest, - log: defaultLog, - includeStackTraces: true, - userHandlerIndex: './index', -}; -const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; -const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; -async function handler(event, context) { - const sanitizedEvent = { ...event, ResponseURL: '...' }; - exports.external.log(JSON.stringify(sanitizedEvent, undefined, 2)); - // ignore DELETE event when the physical resource ID is the marker that - // indicates that this DELETE is a subsequent DELETE to a failed CREATE - // operation. - if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { - exports.external.log('ignoring DELETE event caused by a failed CREATE event'); - await submitResponse('SUCCESS', event); - return; - } - try { - // invoke the user handler. this is intentionally inside the try-catch to - // ensure that if there is an error it's reported as a failure to - // cloudformation (otherwise cfn waits). - // eslint-disable-next-line @typescript-eslint/no-require-imports - const userHandler = require(exports.external.userHandlerIndex).handler; - const result = await userHandler(sanitizedEvent, context); - // validate user response and create the combined event - const responseEvent = renderResponse(event, result); - // submit to cfn as success - await submitResponse('SUCCESS', responseEvent); - } - catch (e) { - const resp = { - ...event, - Reason: exports.external.includeStackTraces ? e.stack : e.message, - }; - if (!resp.PhysicalResourceId) { - // special case: if CREATE fails, which usually implies, we usually don't - // have a physical resource id. in this case, the subsequent DELETE - // operation does not have any meaning, and will likely fail as well. to - // address this, we use a marker so the provider framework can simply - // ignore the subsequent DELETE. - if (event.RequestType === 'Create') { - exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); - resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; - } - else { - // otherwise, if PhysicalResourceId is not specified, something is - // terribly wrong because all other events should have an ID. - exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); - } - } - // this is an actual error, fail the activity altogether and exist. - await submitResponse('FAILED', resp); - } -} -exports.handler = handler; -function renderResponse(cfnRequest, handlerResponse = {}) { - // if physical ID is not returned, we have some defaults for you based - // on the request type. - const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; - // if we are in DELETE and physical ID was changed, it's an error. - if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { - throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); - } - // merge request event and result event (result prevails). - return { - ...cfnRequest, - ...handlerResponse, - PhysicalResourceId: physicalResourceId, - }; -} -async function submitResponse(status, event) { - const json = { - Status: status, - Reason: event.Reason ?? status, - StackId: event.StackId, - RequestId: event.RequestId, - PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, - LogicalResourceId: event.LogicalResourceId, - NoEcho: event.NoEcho, - Data: event.Data, - }; - exports.external.log('submit response to cloudformation', json); - const responseBody = JSON.stringify(json); - const parsedUrl = url.parse(event.ResponseURL); - const req = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { 'content-type': '', 'content-length': responseBody.length }, - }; - await exports.external.sendHttpRequest(req, responseBody); -} -async function defaultSendHttpRequest(options, responseBody) { - return new Promise((resolve, reject) => { - try { - const request = https.request(options, _ => resolve()); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); -} -function defaultLog(fmt, ...params) { - // eslint-disable-next-line no-console - console.log(fmt, ...params); -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLFNBQVM7Q0FDNUIsQ0FBQztBQUVGLE1BQU0sZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDbEcsTUFBTSwwQkFBMEIsR0FBRyw4REFBOEQsQ0FBQztBQVczRixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsTUFBTSxjQUFjLEdBQUcsRUFBRSxHQUFHLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLENBQUM7SUFDeEQsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxjQUFjLEVBQUUsU0FBUyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFM0QsdUVBQXVFO0lBQ3Z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ZXN0KHJlcSwgcmVzcG9uc2VCb2R5KTtcbn1cblxuYXN5bmMgZnVuY3Rpb24gZGVmYXVsdFNlbmRIdHRwUmVxdWVzdChvcHRpb25zOiBodHRwcy5SZXF1ZXN0T3B0aW9ucywgcmVzcG9uc2VCb2R5OiBzdHJpbmcpOiBQcm9taXNlPHZvaWQ+IHtcbiAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICB0cnkge1xuICAgICAgY29uc3QgcmVxdWVzdCA9IGh0dHBzLnJlcXVlc3Qob3B0aW9ucywgXyA9PiByZXNvbHZlKCkpO1xuICAgICAgcmVxdWVzdC5vbignZXJyb3InLCByZWplY3QpO1xuICAgICAgcmVxdWVzdC53cml0ZShyZXNwb25zZUJvZHkpO1xuICAgICAgcmVxdWVzdC5lbmQoKTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICByZWplY3QoZSk7XG4gICAgfVxuICB9KTtcbn1cblxuZnVuY3Rpb24gZGVmYXVsdExvZyhmbXQ6IHN0cmluZywgLi4ucGFyYW1zOiBhbnlbXSkge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tY29uc29sZVxuICBjb25zb2xlLmxvZyhmbXQsIC4uLnBhcmFtcyk7XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/__entrypoint__.js b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/__entrypoint__.js new file mode 100644 index 0000000000000..1e3a3093c1706 --- /dev/null +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/__entrypoint__.js @@ -0,0 +1,144 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.withRetries = exports.handler = exports.external = void 0; +const https = require("https"); +const url = require("url"); +// for unit tests +exports.external = { + sendHttpRequest: defaultSendHttpRequest, + log: defaultLog, + includeStackTraces: true, + userHandlerIndex: './index', +}; +const CREATE_FAILED_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED'; +const MISSING_PHYSICAL_ID_MARKER = 'AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID'; +async function handler(event, context) { + const sanitizedEvent = { ...event, ResponseURL: '...' }; + exports.external.log(JSON.stringify(sanitizedEvent, undefined, 2)); + // ignore DELETE event when the physical resource ID is the marker that + // indicates that this DELETE is a subsequent DELETE to a failed CREATE + // operation. + if (event.RequestType === 'Delete' && event.PhysicalResourceId === CREATE_FAILED_PHYSICAL_ID_MARKER) { + exports.external.log('ignoring DELETE event caused by a failed CREATE event'); + await submitResponse('SUCCESS', event); + return; + } + try { + // invoke the user handler. this is intentionally inside the try-catch to + // ensure that if there is an error it's reported as a failure to + // cloudformation (otherwise cfn waits). + // eslint-disable-next-line @typescript-eslint/no-require-imports + const userHandler = require(exports.external.userHandlerIndex).handler; + const result = await userHandler(sanitizedEvent, context); + // validate user response and create the combined event + const responseEvent = renderResponse(event, result); + // submit to cfn as success + await submitResponse('SUCCESS', responseEvent); + } + catch (e) { + const resp = { + ...event, + Reason: exports.external.includeStackTraces ? e.stack : e.message, + }; + if (!resp.PhysicalResourceId) { + // special case: if CREATE fails, which usually implies, we usually don't + // have a physical resource id. in this case, the subsequent DELETE + // operation does not have any meaning, and will likely fail as well. to + // address this, we use a marker so the provider framework can simply + // ignore the subsequent DELETE. + if (event.RequestType === 'Create') { + exports.external.log('CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored'); + resp.PhysicalResourceId = CREATE_FAILED_PHYSICAL_ID_MARKER; + } + else { + // otherwise, if PhysicalResourceId is not specified, something is + // terribly wrong because all other events should have an ID. + exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`); + } + } + // this is an actual error, fail the activity altogether and exist. + await submitResponse('FAILED', resp); + } +} +exports.handler = handler; +function renderResponse(cfnRequest, handlerResponse = {}) { + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = handlerResponse.PhysicalResourceId ?? cfnRequest.PhysicalResourceId ?? cfnRequest.RequestId; + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...handlerResponse, + PhysicalResourceId: physicalResourceId, + }; +} +async function submitResponse(status, event) { + const json = { + Status: status, + Reason: event.Reason ?? status, + StackId: event.StackId, + RequestId: event.RequestId, + PhysicalResourceId: event.PhysicalResourceId || MISSING_PHYSICAL_ID_MARKER, + LogicalResourceId: event.LogicalResourceId, + NoEcho: event.NoEcho, + Data: event.Data, + }; + exports.external.log('submit response to cloudformation', json); + const responseBody = JSON.stringify(json); + const parsedUrl = url.parse(event.ResponseURL); + const req = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { 'content-type': '', 'content-length': responseBody.length }, + }; + const retryOptions = { + attempts: 5, + sleep: 1000, + }; + await withRetries(retryOptions, exports.external.sendHttpRequest)(req, responseBody); +} +async function defaultSendHttpRequest(options, responseBody) { + return new Promise((resolve, reject) => { + try { + const request = https.request(options, _ => resolve()); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); +} +function defaultLog(fmt, ...params) { + // eslint-disable-next-line no-console + console.log(fmt, ...params); +} +function withRetries(options, fn) { + return async (...xs) => { + let attempts = options.attempts; + let ms = options.sleep; + while (true) { + try { + return await fn(...xs); + } + catch (e) { + if (attempts-- <= 0) { + throw e; + } + await sleep(Math.floor(Math.random() * ms)); + ms *= 2; + } + } + }; +} +exports.withRetries = withRetries; +async function sleep(ms) { + return new Promise((ok) => setTimeout(ok, ms)); +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWpzLWVudHJ5cG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJub2RlanMtZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsMkJBQTJCO0FBRTNCLGlCQUFpQjtBQUNKLFFBQUEsUUFBUSxHQUFHO0lBQ3RCLGVBQWUsRUFBRSxzQkFBc0I7SUFDdkMsR0FBRyxFQUFFLFVBQVU7SUFDZixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGdCQUFnQixFQUFFLFNBQVM7Q0FDNUIsQ0FBQztBQUVGLE1BQU0sZ0NBQWdDLEdBQUcsd0RBQXdELENBQUM7QUFDbEcsTUFBTSwwQkFBMEIsR0FBRyw4REFBOEQsQ0FBQztBQVczRixLQUFLLFVBQVUsT0FBTyxDQUFDLEtBQWtELEVBQUUsT0FBMEI7SUFDMUcsTUFBTSxjQUFjLEdBQUcsRUFBRSxHQUFHLEtBQUssRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLENBQUM7SUFDeEQsZ0JBQVEsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxjQUFjLEVBQUUsU0FBUyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFM0QsdUVBQXVFO0lBQ3ZFLHVFQUF1RTtJQUN2RSxhQUFhO0lBQ2IsSUFBSSxLQUFLLENBQUMsV0FBVyxLQUFLLFFBQVEsSUFBSSxLQUFLLENBQUMsa0JBQWtCLEtBQUssZ0NBQWdDLEVBQUU7UUFDbkcsZ0JBQVEsQ0FBQyx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AgICBsZXQgYXR0ZW1wdHMgPSBvcHRpb25zLmF0dGVtcHRzO1xuICAgIGxldCBtcyA9IG9wdGlvbnMuc2xlZXA7XG4gICAgd2hpbGUgKHRydWUpIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIHJldHVybiBhd2FpdCBmbiguLi54cyk7XG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIGlmIChhdHRlbXB0cy0tIDw9IDApIHtcbiAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICB9XG4gICAgICAgIGF3YWl0IHNsZWVwKE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSAqIG1zKSk7XG4gICAgICAgIG1zICo9IDI7XG4gICAgICB9XG4gICAgfVxuICB9O1xufVxuXG5hc3luYyBmdW5jdGlvbiBzbGVlcChtczogbnVtYmVyKTogUHJvbWlzZTx2b2lkPiB7XG4gIHJldHVybiBuZXcgUHJvbWlzZSgob2spID0+IHNldFRpbWVvdXQob2ssIG1zKSk7XG59Il19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.d.ts b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/index.d.ts similarity index 100% rename from packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.d.ts rename to packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/index.d.ts diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.js b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/index.js similarity index 100% rename from packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.js rename to packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/index.js diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.ts b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/index.ts similarity index 100% rename from packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/index.ts rename to packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d/index.ts diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/aws-cdk-firehose-delivery-stream-s3-all-properties.assets.json b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/aws-cdk-firehose-delivery-stream-s3-all-properties.assets.json index 312d3432662fa..32f295dd0fa8c 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/aws-cdk-firehose-delivery-stream-s3-all-properties.assets.json +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/aws-cdk-firehose-delivery-stream-s3-all-properties.assets.json @@ -1,15 +1,15 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { - "60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26": { + "bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d": { "source": { - "path": "asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26", + "path": "asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26.zip", + "objectKey": "bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "548b7d7251adc589cd6011052b5314c57ed121228ce8cc01c575c961b13bbc8a": { + "55fc1aa9bf364d3e6b9363b2280e7b4560be5dd8277f2ee814c2af1ed17c6560": { "source": { "path": "aws-cdk-firehose-delivery-stream-s3-all-properties.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "548b7d7251adc589cd6011052b5314c57ed121228ce8cc01c575c961b13bbc8a.json", + "objectKey": "55fc1aa9bf364d3e6b9363b2280e7b4560be5dd8277f2ee814c2af1ed17c6560.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/aws-cdk-firehose-delivery-stream-s3-all-properties.template.json b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/aws-cdk-firehose-delivery-stream-s3-all-properties.template.json index e8cb814cd030b..39b470737df69 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/aws-cdk-firehose-delivery-stream-s3-all-properties.template.json +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/aws-cdk-firehose-delivery-stream-s3-all-properties.template.json @@ -112,7 +112,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26.zip" + "S3Key": "bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d.zip" }, "Timeout": 900, "MemorySize": 128, @@ -723,6 +723,9 @@ "ap-southeast-2": { "FirehoseCidrBlock": "13.210.67.224/27" }, + "ap-southeast-3": { + "FirehoseCidrBlock": "108.136.221.64/27" + }, "ca-central-1": { "FirehoseCidrBlock": "35.183.92.128/27" }, diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/integ.json b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/integ.json index 77fe5f65028cc..c8cbc34475565 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.s3-bucket.lit": { "stacks": [ diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/manifest.json index b4e51ce64d4ee..e0995f251d108 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -23,7 +23,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/548b7d7251adc589cd6011052b5314c57ed121228ce8cc01c575c961b13bbc8a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/55fc1aa9bf364d3e6b9363b2280e7b4560be5dd8277f2ee814c2af1ed17c6560.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/tree.json b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/tree.json index e306b40574931..b0b2405480d01 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations/test/s3-bucket.lit.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "aws-cdk-firehose-delivery-stream-s3-all-properties": { @@ -116,14 +116,14 @@ "id": "Default", "path": "aws-cdk-firehose-delivery-stream-s3-all-properties/Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" } } }, @@ -140,30 +140,30 @@ "id": "Staging", "path": "aws-cdk-firehose-delivery-stream-s3-all-properties/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" } }, "Role": { "id": "Role", "path": "aws-cdk-firehose-delivery-stream-s3-all-properties/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" } }, "Handler": { "id": "Handler", "path": "aws-cdk-firehose-delivery-stream-s3-all-properties/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CustomResourceProvider", + "version": "0.0.0" } }, "BackupBucket": { @@ -266,14 +266,14 @@ "id": "Default", "path": "aws-cdk-firehose-delivery-stream-s3-all-properties/BackupBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" } } }, @@ -393,8 +393,8 @@ "id": "Stage", "path": "aws-cdk-firehose-delivery-stream-s3-all-properties/DataProcessorFunction/Code/Stage", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" } }, "AssetBucket": { @@ -982,20 +982,20 @@ "id": "@aws-cdk--aws-kinesisfirehose.CidrBlocks", "path": "aws-cdk-firehose-delivery-stream-s3-all-properties/@aws-cdk--aws-kinesisfirehose.CidrBlocks", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnMapping", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/aws-cdk-firehose-delivery-stream.assets.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/aws-cdk-firehose-delivery-stream.assets.json index 448185a77043a..fea7f6029c4a2 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/aws-cdk-firehose-delivery-stream.assets.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/aws-cdk-firehose-delivery-stream.assets.json @@ -1,7 +1,7 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { - "d88f95eb05d74eea2d0011077223700e64b8f137cf4e393643851e9ec8683a4d": { + "c0f01e3a8afc4fea40b745b9c69da99f80d3f95ab5eba68c0879505fb9f73459": { "source": { "path": "aws-cdk-firehose-delivery-stream.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d88f95eb05d74eea2d0011077223700e64b8f137cf4e393643851e9ec8683a4d.json", + "objectKey": "c0f01e3a8afc4fea40b745b9c69da99f80d3f95ab5eba68c0879505fb9f73459.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/aws-cdk-firehose-delivery-stream.template.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/aws-cdk-firehose-delivery-stream.template.json index 4e4374a8c2abe..46872b652c359 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/aws-cdk-firehose-delivery-stream.template.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/aws-cdk-firehose-delivery-stream.template.json @@ -217,6 +217,9 @@ "ap-southeast-2": { "FirehoseCidrBlock": "13.210.67.224/27" }, + "ap-southeast-3": { + "FirehoseCidrBlock": "108.136.221.64/27" + }, "ca-central-1": { "FirehoseCidrBlock": "35.183.92.128/27" }, diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/integ.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/integ.json index 41ac976cb6164..5b32bf668673f 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.delivery-stream": { "stacks": [ diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/manifest.json index e5b8b2e7903fa..3bc51b0a15b75 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -23,7 +23,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d88f95eb05d74eea2d0011077223700e64b8f137cf4e393643851e9ec8683a4d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c0f01e3a8afc4fea40b745b9c69da99f80d3f95ab5eba68c0879505fb9f73459.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/tree.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/tree.json index c6e4174859788..698c0523f8962 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "aws-cdk-firehose-delivery-stream": { @@ -330,20 +330,20 @@ "id": "@aws-cdk--aws-kinesisfirehose.CidrBlocks", "path": "aws-cdk-firehose-delivery-stream/@aws-cdk--aws-kinesisfirehose.CidrBlocks", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnMapping", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/aws-cdk-firehose-delivery-stream-source-stream.assets.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/aws-cdk-firehose-delivery-stream-source-stream.assets.json index a6d3f20832e69..726e1d063a6c5 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/aws-cdk-firehose-delivery-stream-source-stream.assets.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/aws-cdk-firehose-delivery-stream-source-stream.assets.json @@ -1,7 +1,7 @@ { - "version": "20.0.0", + "version": "21.0.0", "files": { - "d4c12e67f7a5f0b4ddedfd728501d0cc900f4d5573be686a7b67aff2fdcff841": { + "a29f224cc0c6a912790804d03fd575433b70747d51ecaee20fdca915ad05b006": { "source": { "path": "aws-cdk-firehose-delivery-stream-source-stream.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d4c12e67f7a5f0b4ddedfd728501d0cc900f4d5573be686a7b67aff2fdcff841.json", + "objectKey": "a29f224cc0c6a912790804d03fd575433b70747d51ecaee20fdca915ad05b006.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/aws-cdk-firehose-delivery-stream-source-stream.template.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/aws-cdk-firehose-delivery-stream-source-stream.template.json index d1df6d1374683..427d4a0051bbb 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/aws-cdk-firehose-delivery-stream-source-stream.template.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/aws-cdk-firehose-delivery-stream-source-stream.template.json @@ -235,6 +235,9 @@ "ap-southeast-2": { "FirehoseCidrBlock": "13.210.67.224/27" }, + "ap-southeast-3": { + "FirehoseCidrBlock": "108.136.221.64/27" + }, "ca-central-1": { "FirehoseCidrBlock": "35.183.92.128/27" }, diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/integ.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/integ.json index 9b90f40944c9e..011c28b255017 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "integ.delivery-stream.source-stream": { "stacks": [ diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/manifest.json index 28e19902faa4f..79db11bc1ba5a 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -23,7 +23,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d4c12e67f7a5f0b4ddedfd728501d0cc900f4d5573be686a7b67aff2fdcff841.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a29f224cc0c6a912790804d03fd575433b70747d51ecaee20fdca915ad05b006.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/tree.json b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/tree.json index d47d8a679814d..4381c229f3465 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/test/delivery-stream.source-stream.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.85" + "version": "10.1.129" } }, "aws-cdk-firehose-delivery-stream-source-stream": { @@ -188,8 +188,8 @@ "id": "AwsCdkKinesisEncryptedStreamsUnsupportedRegions", "path": "aws-cdk-firehose-delivery-stream-source-stream/AwsCdkKinesisEncryptedStreamsUnsupportedRegions", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnCondition", + "version": "0.0.0" } }, "Delivery Stream": { @@ -335,20 +335,20 @@ "id": "@aws-cdk--aws-kinesisfirehose.CidrBlocks", "path": "aws-cdk-firehose-delivery-stream-source-stream/@aws-cdk--aws-kinesisfirehose.CidrBlocks", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.CfnMapping", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.1.85" + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts index 6578ee94d4d95..ca2a5a8dd986f 100644 --- a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts +++ b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts @@ -431,6 +431,7 @@ export const FIREHOSE_CIDR_BLOCKS: { [region: string]: string } = { 'ap-south-1': '13.232.67.32', 'ap-southeast-1': '13.228.64.192', 'ap-southeast-2': '13.210.67.224', + 'ap-southeast-3': '108.136.221.64', 'ca-central-1': '35.183.92.128', 'cn-north-1': '52.81.151.32', 'cn-northwest-1': '161.189.23.64', From 98386f58234e503066e95975cad5a4ec08eaafe7 Mon Sep 17 00:00:00 2001 From: clueleaf <10379303+clueleaf@users.noreply.github.com> Date: Thu, 20 Oct 2022 03:57:40 +0900 Subject: [PATCH 3/8] chore(ec2): add email-smtp interface endpoint (#22558) Added interface VPC endpoint for SES to InterfaceVpcEndpointAwsService to make it easier to implement ones SES VPC endpoint: https://docs.aws.amazon.com/ses/latest/dg/send-email-set-up-vpc-endpoints.html ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts | 1 + packages/@aws-cdk/aws-ec2/package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts index e55a4597b31bc..50be293f93e78 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts @@ -401,6 +401,7 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ public static readonly WORKSPACES = new InterfaceVpcEndpointAwsService('workspaces'); public static readonly XRAY = new InterfaceVpcEndpointAwsService('xray'); public static readonly SECURITYHUB = new InterfaceVpcEndpointAwsService('securityhub'); + public static readonly EMAIL_SMTP = new InterfaceVpcEndpointAwsService('email-smtp'); /** * The name of the service. e.g. com.amazonaws.us-east-1.ecs diff --git a/packages/@aws-cdk/aws-ec2/package.json b/packages/@aws-cdk/aws-ec2/package.json index 8216ff7012620..bbbfabab21b85 100644 --- a/packages/@aws-cdk/aws-ec2/package.json +++ b/packages/@aws-cdk/aws-ec2/package.json @@ -324,6 +324,7 @@ "docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.TRANSCRIBE", "docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.XRAY", "docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.SECURITYHUB", + "docs-public-apis:@aws-cdk/aws-ec2.InterfaceVpcEndpointAwsService.EMAIL_SMTP", "docs-public-apis:@aws-cdk/aws-ec2.Port.toString", "docs-public-apis:@aws-cdk/aws-ec2.PrivateSubnet.fromPrivateSubnetAttributes", "docs-public-apis:@aws-cdk/aws-ec2.PublicSubnet.fromPublicSubnetAttributes", From 9139ca96ffc010e13393aff927d7b7eacfbae4f9 Mon Sep 17 00:00:00 2001 From: Alex Rewa Date: Wed, 19 Oct 2022 23:02:47 +0300 Subject: [PATCH 4/8] fix(integ-runner): Fix call to spawnSync for hooks commands (#22429) Fixes the issue #22344 I reworked the approach of calling `exec` by splitting each command in hook to the command itself and it's arguments. All hooks were affected: preDeploy, postDeploy, preDestroy, postDestroy. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/runner/integ-test-runner.ts | 26 ++++++++++++------- packages/@aws-cdk/integ-runner/lib/utils.ts | 8 ++++++ .../test/runner/integ-test-runner.test.ts | 14 +++++++--- .../integ.json | 8 +++--- 4 files changed, 39 insertions(+), 17 deletions(-) diff --git a/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts b/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts index cf6fe6b9efb5b..dcdaa58f2e47f 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts @@ -3,7 +3,7 @@ import { RequireApproval } from '@aws-cdk/cloud-assembly-schema'; import { DeployOptions, DestroyOptions } from 'cdk-cli-wrapper'; import * as fs from 'fs-extra'; import * as logger from '../logger'; -import { chain, exec } from '../utils'; +import { chunks, exec } from '../utils'; import { DestructiveChange, AssertionResults, AssertionResult } from '../workers/common'; import { IntegRunnerOptions, IntegRunner, DEFAULT_SYNTH_OPTIONS } from './runner-base'; @@ -222,8 +222,10 @@ export class IntegTestRunner extends IntegRunner { const actualTestCase = this.actualTestSuite.testSuite[testCaseName]; try { if (actualTestCase.hooks?.preDestroy) { - exec([chain(actualTestCase.hooks.preDestroy)], { - cwd: path.dirname(this.snapshotDir), + actualTestCase.hooks.preDestroy.forEach(cmd => { + exec(chunks(cmd), { + cwd: path.dirname(this.snapshotDir), + }); }); } this.cdk.destroy({ @@ -231,8 +233,10 @@ export class IntegTestRunner extends IntegRunner { }); if (actualTestCase.hooks?.postDestroy) { - exec([chain(actualTestCase.hooks.postDestroy)], { - cwd: path.dirname(this.snapshotDir), + actualTestCase.hooks.postDestroy.forEach(cmd => { + exec(chunks(cmd), { + cwd: path.dirname(this.snapshotDir), + }); }); } } catch (e) { @@ -255,8 +259,10 @@ export class IntegTestRunner extends IntegRunner { const actualTestCase = this.actualTestSuite.testSuite[testCaseName]; try { if (actualTestCase.hooks?.preDeploy) { - exec([chain(actualTestCase.hooks?.preDeploy)], { - cwd: path.dirname(this.snapshotDir), + actualTestCase.hooks.preDeploy.forEach(cmd => { + exec(chunks(cmd), { + cwd: path.dirname(this.snapshotDir), + }); }); } // if the update workflow is not disabled, first @@ -297,8 +303,10 @@ export class IntegTestRunner extends IntegRunner { }); if (actualTestCase.hooks?.postDeploy) { - exec([chain(actualTestCase.hooks?.postDeploy)], { - cwd: path.dirname(this.snapshotDir), + actualTestCase.hooks.postDeploy.forEach(cmd => { + exec(chunks(cmd), { + cwd: path.dirname(this.snapshotDir), + }); }); } diff --git a/packages/@aws-cdk/integ-runner/lib/utils.ts b/packages/@aws-cdk/integ-runner/lib/utils.ts index 74e5eb2154ae7..c783e6ca2a491 100644 --- a/packages/@aws-cdk/integ-runner/lib/utils.ts +++ b/packages/@aws-cdk/integ-runner/lib/utils.ts @@ -41,6 +41,14 @@ export function chain(commands: string[]): string { return commands.filter(c => !!c).join(' && '); } +/** + * Split command to chunks by space + */ +export function chunks(command: string): string[] { + const result = command.match(/(?:[^\s"]+|"[^"]*")+/g); + return result ?? []; +} + /** * A class holding a set of items which are being crossed off in time diff --git a/packages/@aws-cdk/integ-runner/test/runner/integ-test-runner.test.ts b/packages/@aws-cdk/integ-runner/test/runner/integ-test-runner.test.ts index 9fad8eb71a1a9..b817c9bdb7f11 100644 --- a/packages/@aws-cdk/integ-runner/test/runner/integ-test-runner.test.ts +++ b/packages/@aws-cdk/integ-runner/test/runner/integ-test-runner.test.ts @@ -347,16 +347,22 @@ describe('IntegTest runIntegTests', () => { // THEN expect(spawnSyncMock.mock.calls).toEqual(expect.arrayContaining([ expect.arrayContaining([ - 'echo "preDeploy"', + 'echo', ['"preDeploy hook"'], ]), expect.arrayContaining([ - 'echo "postDeploy"', + 'echo', ['"postDeploy hook"'], ]), expect.arrayContaining([ - 'echo "preDestroy"', + 'echo', ['"preDestroy hook"'], ]), expect.arrayContaining([ - 'echo "postDestroy"', + 'echo', ['"postDestroy hook"'], + ]), + expect.arrayContaining([ + 'ls', [], + ]), + expect.arrayContaining([ + 'echo', ['-n', '"No new line"'], ]), ])); }); diff --git a/packages/@aws-cdk/integ-runner/test/test-data/cdk-integ.out.test-with-snapshot-assets/integ.json b/packages/@aws-cdk/integ-runner/test/test-data/cdk-integ.out.test-with-snapshot-assets/integ.json index 2cd7ddd429f8a..126b54791cd02 100644 --- a/packages/@aws-cdk/integ-runner/test/test-data/cdk-integ.out.test-with-snapshot-assets/integ.json +++ b/packages/@aws-cdk/integ-runner/test/test-data/cdk-integ.out.test-with-snapshot-assets/integ.json @@ -6,10 +6,10 @@ "stackUpdateWorkflow": false, "diffAssets": false, "hooks": { - "preDeploy": ["echo \"preDeploy\""], - "postDeploy": ["echo \"postDeploy\""], - "preDestroy": ["echo \"preDestroy\""], - "postDestroy": ["echo \"postDestroy\""] + "preDeploy": ["echo \"preDeploy hook\"", "ls", "echo -n \"No new line\""], + "postDeploy": ["echo \"postDeploy hook\""], + "preDestroy": ["echo \"preDestroy hook\""], + "postDestroy": ["echo \"postDestroy hook\""] }, "allowDestroy": [ "AWS::IAM::Role" From 9934619970dcb582106e9b2bf0d373d730de1fee Mon Sep 17 00:00:00 2001 From: openwebsolns Date: Wed, 19 Oct 2022 19:16:54 -0400 Subject: [PATCH 5/8] fix(codeguruprofiler): incorrect profiling group name is returned when using importing (#22554) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/aws/aws-cdk/issues/22546. Verified via TDD with new unit test. Before the change, the unit test failed, replicating the bug in the issue with output: ```plain FAIL test/profiling-group.test.js profiling group ✓ attach read permission to Profiling group via fromProfilingGroupArn (71 ms) ✓ attach publish permission to Profiling group via fromProfilingGroupName (27 ms) ✕ use name specified via fromProfilingGroupName (8 ms) ✓ default profiling group (21 ms) ✓ allows setting its ComputePlatform (14 ms) ✓ default profiling group without name (13 ms) ✓ default profiling group without name when name exceeding limit is generated (18 ms) ✓ grant publish permissions profiling group (25 ms) ✓ grant read permissions profiling group (25 ms) ● profiling group › use specified via name via fromProfilingGroupName expect(received).toEqual(expected) // deep equality Expected: "MyAwesomeProfilingGroup" Received: "profilingGroup" 174 | 175 | const profilingGroup = ProfilingGroup.fromProfilingGroupName(stack, 'MyProfilingGroup', 'MyAwesomeProfilingGroup'); > 176 | expect(profilingGroup.profilingGroupName).toEqual('MyAwesomeProfilingGroup'); | ^ 177 | }); 178 | 179 | test('default profiling group', () => { at Object. (test/profiling-group.test.ts:176:47) ``` ---- ### All Submissions: * [Yes] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [No] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [N/A] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/profiling-group.ts | 2 +- .../aws-codeguruprofiler/package.json | 1 + .../integ.profiler-group-import-functions.ts | 55 ++ .../ProfilingGroupTestStack.assets.json | 19 + .../ProfilingGroupTestStack.template.json | 131 +++ .../index.js | 768 ++++++++++++++++++ .../cdk.out | 1 + .../integ.json | 12 + .../manifest.json | 165 ++++ ...efaultTestDeployAssert4D02624A.assets.json | 32 + ...aultTestDeployAssert4D02624A.template.json | 131 +++ .../tree.json | 342 ++++++++ .../test/profiling-group.test.ts | 7 + 13 files changed, 1665 insertions(+), 1 deletion(-) create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/integ.profiler-group-import-functions.ts create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/ProfilingGroupTestStack.assets.json create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/ProfilingGroupTestStack.template.json create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/cdk.out create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/integ.json create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/manifest.json create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/testDefaultTestDeployAssert4D02624A.assets.json create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/testDefaultTestDeployAssert4D02624A.template.json create mode 100644 packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/tree.json diff --git a/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts b/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts index 0c878278b31bf..4e4c034563107 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts +++ b/packages/@aws-cdk/aws-codeguruprofiler/lib/profiling-group.ts @@ -154,7 +154,7 @@ export class ProfilingGroup extends ProfilingGroupBase { */ public static fromProfilingGroupArn(scope: Construct, id: string, profilingGroupArn: string): IProfilingGroup { class Import extends ProfilingGroupBase { - public readonly profilingGroupName = Stack.of(scope).splitArn(profilingGroupArn, ArnFormat.SLASH_RESOURCE_NAME).resource; + public readonly profilingGroupName = Stack.of(scope).splitArn(profilingGroupArn, ArnFormat.SLASH_RESOURCE_NAME).resourceName!; public readonly profilingGroupArn = profilingGroupArn; } diff --git a/packages/@aws-cdk/aws-codeguruprofiler/package.json b/packages/@aws-cdk/aws-codeguruprofiler/package.json index ab1b537852b1c..949fcc3b90e43 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/package.json +++ b/packages/@aws-cdk/aws-codeguruprofiler/package.json @@ -85,6 +85,7 @@ "@aws-cdk/assertions": "0.0.0", "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", + "@aws-cdk/integ-tests": "0.0.0", "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^27.5.2" diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/integ.profiler-group-import-functions.ts b/packages/@aws-cdk/aws-codeguruprofiler/test/integ.profiler-group-import-functions.ts new file mode 100644 index 0000000000000..913dafd80310f --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/integ.profiler-group-import-functions.ts @@ -0,0 +1,55 @@ +import { AccountRootPrincipal, Role } from '@aws-cdk/aws-iam'; +import { App, CfnOutput, Stack } from '@aws-cdk/core'; +import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests'; +import { ProfilingGroup } from '../lib'; + +const app = new App(); + +const stack = new Stack(app, 'ProfilingGroupTestStack'); + +const profilingGroup1 = new ProfilingGroup(stack, 'ProfilingGroupWithExplicitlySetName', { + profilingGroupName: 'ExplicitlySetName', +}); +const profilingGroup2 = new ProfilingGroup(stack, 'ProfilingGroupWithImplicitlySetName'); + +const publishAppRole = new Role(stack, 'PublishAppRole', { + assumedBy: new AccountRootPrincipal(), +}); +profilingGroup1.grantPublish(publishAppRole); +profilingGroup2.grantPublish(publishAppRole); + +const importedGroupWithExplicitlySetName = ProfilingGroup.fromProfilingGroupName( + stack, + 'ImportedProfilingGroupWithExplicitlySetName', + profilingGroup1.profilingGroupName, +); + +const importedGroupWithImplicitlySetName = ProfilingGroup.fromProfilingGroupName( + stack, + 'ImportedProfilingGroupWithImplicitlySetName', + profilingGroup2.profilingGroupName, +); + +new CfnOutput(stack, 'ExplicitlySetProfilingGroupName', { + value: importedGroupWithExplicitlySetName.profilingGroupName, +}); + +new CfnOutput(stack, 'ImplicitlySetProfilingGroupName', { + value: importedGroupWithImplicitlySetName.profilingGroupName, +}); + +const testCase = new IntegTest(app, 'test', { + testCases: [stack], +}); + +const describe = testCase.assertions.awsApiCall('CloudFormation', 'describeStacks', { + StackName: 'ProfilingGroupTestStack', +}); + +describe.assertAtPath('Stacks.0.Outputs.0.OutputKey', ExpectedResult.stringLikeRegexp('ExplicitlySetProfilingGroupName')); +describe.assertAtPath('Stacks.0.Outputs.0.OutputValue', ExpectedResult.stringLikeRegexp('ExplicitlySetName')); + +describe.assertAtPath('Stacks.0.Outputs.1.OutputKey', ExpectedResult.stringLikeRegexp('ImplicitlySetProfilingGroupName')); +describe.assertAtPath('Stacks.0.Outputs.1.OutputValue', ExpectedResult.stringLikeRegexp('ProfilingGroupTestStackProfilingGroupWithImplicitlySetName98463923')); + +app.synth(); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/ProfilingGroupTestStack.assets.json b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/ProfilingGroupTestStack.assets.json new file mode 100644 index 0000000000000..7a686fcaea9e9 --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/ProfilingGroupTestStack.assets.json @@ -0,0 +1,19 @@ +{ + "version": "21.0.0", + "files": { + "49d6a3151509f39124c2f82b21cf55a8a1364289fce8b6f8b764af6e204c6647": { + "source": { + "path": "ProfilingGroupTestStack.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "49d6a3151509f39124c2f82b21cf55a8a1364289fce8b6f8b764af6e204c6647.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/ProfilingGroupTestStack.template.json b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/ProfilingGroupTestStack.template.json new file mode 100644 index 0000000000000..8c7afb0b9f650 --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/ProfilingGroupTestStack.template.json @@ -0,0 +1,131 @@ +{ + "Resources": { + "ProfilingGroupWithExplicitlySetNameProfilingGroup20552EAE": { + "Type": "AWS::CodeGuruProfiler::ProfilingGroup", + "Properties": { + "ProfilingGroupName": "ExplicitlySetName" + } + }, + "ProfilingGroupWithImplicitlySetNameProfilingGroup21CDF1FC": { + "Type": "AWS::CodeGuruProfiler::ProfilingGroup", + "Properties": { + "ProfilingGroupName": "ProfilingGroupTestStackProfilingGroupWithImplicitlySetName98463923" + } + }, + "PublishAppRole9FEBD682": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PublishAppRoleDefaultPolicyCA1E15C3": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "codeguru-profiler:ConfigureAgent", + "codeguru-profiler:PostAgentProfile" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ProfilingGroupWithExplicitlySetNameProfilingGroup20552EAE", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "ProfilingGroupWithImplicitlySetNameProfilingGroup21CDF1FC", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PublishAppRoleDefaultPolicyCA1E15C3", + "Roles": [ + { + "Ref": "PublishAppRole9FEBD682" + } + ] + } + } + }, + "Outputs": { + "ExplicitlySetProfilingGroupName": { + "Value": { + "Ref": "ProfilingGroupWithExplicitlySetNameProfilingGroup20552EAE" + } + }, + "ImplicitlySetProfilingGroupName": { + "Value": { + "Ref": "ProfilingGroupWithImplicitlySetNameProfilingGroup21CDF1FC" + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js new file mode 100644 index 0000000000000..2d6c2f0e85497 --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle/index.js @@ -0,0 +1,768 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/assertions/providers/lambda-handler/index.ts +var lambda_handler_exports = {}; +__export(lambda_handler_exports, { + handler: () => handler, + isComplete: () => isComplete, + onTimeout: () => onTimeout +}); +module.exports = __toCommonJS(lambda_handler_exports); + +// ../assertions/lib/matcher.ts +var Matcher = class { + static isMatcher(x) { + return x && x instanceof Matcher; + } +}; +var MatchResult = class { + constructor(target) { + this.failures = []; + this.captures = /* @__PURE__ */ new Map(); + this.finalized = false; + this.target = target; + } + push(matcher, path, message) { + return this.recordFailure({ matcher, path, message }); + } + recordFailure(failure) { + this.failures.push(failure); + return this; + } + hasFailed() { + return this.failures.length !== 0; + } + get failCount() { + return this.failures.length; + } + compose(id, inner) { + const innerF = inner.failures; + this.failures.push(...innerF.map((f) => { + return { path: [id, ...f.path], message: f.message, matcher: f.matcher }; + })); + inner.captures.forEach((vals, capture) => { + vals.forEach((value) => this.recordCapture({ capture, value })); + }); + return this; + } + finished() { + if (this.finalized) { + return this; + } + if (this.failCount === 0) { + this.captures.forEach((vals, cap) => cap._captured.push(...vals)); + } + this.finalized = true; + return this; + } + toHumanStrings() { + return this.failures.map((r) => { + const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`; + return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; + }); + } + recordCapture(options) { + let values = this.captures.get(options.capture); + if (values === void 0) { + values = []; + } + values.push(options.value); + this.captures.set(options.capture, values); + } +}; + +// ../assertions/lib/private/matchers/absent.ts +var AbsentMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual !== void 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Received ${actual}, but key should be absent` + }); + } + return result; + } +}; + +// ../assertions/lib/private/type.ts +function getType(obj) { + return Array.isArray(obj) ? "array" : typeof obj; +} + +// ../assertions/lib/match.ts +var Match = class { + static absent() { + return new AbsentMatch("absent"); + } + static arrayWith(pattern) { + return new ArrayMatch("arrayWith", pattern); + } + static arrayEquals(pattern) { + return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); + } + static exact(pattern) { + return new LiteralMatch("exact", pattern, { partialObjects: false }); + } + static objectLike(pattern) { + return new ObjectMatch("objectLike", pattern); + } + static objectEquals(pattern) { + return new ObjectMatch("objectEquals", pattern, { partial: false }); + } + static not(pattern) { + return new NotMatch("not", pattern); + } + static serializedJson(pattern) { + return new SerializedJson("serializedJson", pattern); + } + static anyValue() { + return new AnyMatch("anyValue"); + } + static stringLikeRegexp(pattern) { + return new StringLikeRegexpMatch("stringLikeRegexp", pattern); + } +}; +var LiteralMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partialObjects = options.partialObjects ?? false; + if (Matcher.isMatcher(this.pattern)) { + throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply."); + } + } + test(actual) { + if (Array.isArray(this.pattern)) { + return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual); + } + if (typeof this.pattern === "object") { + return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual); + } + const result = new MatchResult(actual); + if (typeof this.pattern !== typeof actual) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected type ${typeof this.pattern} but received ${getType(actual)}` + }); + return result; + } + if (actual !== this.pattern) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected ${this.pattern} but received ${actual}` + }); + } + return result; + } +}; +var ArrayMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.subsequence = options.subsequence ?? true; + this.partialObjects = options.partialObjects ?? false; + } + test(actual) { + if (!Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type array but received ${getType(actual)}` + }); + } + if (!this.subsequence && this.pattern.length !== actual.length) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected array of length ${this.pattern.length} but received ${actual.length}` + }); + } + let patternIdx = 0; + let actualIdx = 0; + const result = new MatchResult(actual); + while (patternIdx < this.pattern.length && actualIdx < actual.length) { + const patternElement = this.pattern[patternIdx]; + const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); + const matcherName = matcher.name; + if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) { + throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); + } + const innerResult = matcher.test(actual[actualIdx]); + if (!this.subsequence || !innerResult.hasFailed()) { + result.compose(`[${actualIdx}]`, innerResult); + patternIdx++; + actualIdx++; + } else { + actualIdx++; + } + } + for (; patternIdx < this.pattern.length; patternIdx++) { + const pattern = this.pattern[patternIdx]; + const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `; + result.recordFailure({ + matcher: this, + path: [], + message: `Missing element${element}at pattern index ${patternIdx}` + }); + } + return result; + } +}; +var ObjectMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partial = options.partial ?? true; + } + test(actual) { + if (typeof actual !== "object" || Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type object but received ${getType(actual)}` + }); + } + const result = new MatchResult(actual); + if (!this.partial) { + for (const a of Object.keys(actual)) { + if (!(a in this.pattern)) { + result.recordFailure({ + matcher: this, + path: [`/${a}`], + message: "Unexpected key" + }); + } + } + } + for (const [patternKey, patternVal] of Object.entries(this.pattern)) { + if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { + result.recordFailure({ + matcher: this, + path: [`/${patternKey}`], + message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}` + }); + continue; + } + const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); + const inner = matcher.test(actual[patternKey]); + result.compose(`/${patternKey}`, inner); + } + return result; + } +}; +var SerializedJson = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + if (getType(actual) !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected JSON as a string but found ${getType(actual)}` + }); + return result; + } + let parsed; + try { + parsed = JSON.parse(actual); + } catch (err) { + if (err instanceof SyntaxError) { + result.recordFailure({ + matcher: this, + path: [], + message: `Invalid JSON string: ${actual}` + }); + return result; + } else { + throw err; + } + } + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(parsed); + result.compose(`(${this.name})`, innerResult); + return result; + } +}; +var NotMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(actual); + const result = new MatchResult(actual); + if (innerResult.failCount === 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}` + }); + } + return result; + } +}; +var AnyMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual == null) { + result.recordFailure({ + matcher: this, + path: [], + message: "Expected a value but found none" + }); + } + return result; + } +}; +var StringLikeRegexpMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + const regex = new RegExp(this.pattern, "gm"); + if (typeof actual !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected a string, but got '${typeof actual}'` + }); + } + if (!regex.test(actual)) { + result.recordFailure({ + matcher: this, + path: [], + message: `String '${actual}' did not match pattern '${this.pattern}'` + }); + } + return result; + } +}; + +// lib/assertions/providers/lambda-handler/base.ts +var https = __toESM(require("https")); +var url = __toESM(require("url")); +var AWS = __toESM(require("aws-sdk")); +var CustomResourceHandler = class { + constructor(event, context) { + this.event = event; + this.context = context; + this.timedOut = false; + this.timeout = setTimeout(async () => { + await this.respond({ + status: "FAILED", + reason: "Lambda Function Timeout", + data: this.context.logStreamName + }); + this.timedOut = true; + }, context.getRemainingTimeInMillis() - 1200); + this.event = event; + this.physicalResourceId = extractPhysicalResourceId(event); + } + async handle() { + try { + if ("stateMachineArn" in this.event.ResourceProperties) { + const req = { + stateMachineArn: this.event.ResourceProperties.stateMachineArn, + name: this.event.RequestId, + input: JSON.stringify(this.event) + }; + await this.startExecution(req); + return; + } else { + const response = await this.processEvent(this.event.ResourceProperties); + return response; + } + } catch (e) { + console.log(e); + throw e; + } finally { + clearTimeout(this.timeout); + } + } + async handleIsComplete() { + try { + const result = await this.processEvent(this.event.ResourceProperties); + return result; + } catch (e) { + console.log(e); + return; + } finally { + clearTimeout(this.timeout); + } + } + async startExecution(req) { + try { + const sfn = new AWS.StepFunctions(); + await sfn.startExecution(req).promise(); + } finally { + clearTimeout(this.timeout); + } + } + respond(response) { + if (this.timedOut) { + return; + } + const cfResponse = { + Status: response.status, + Reason: response.reason, + PhysicalResourceId: this.physicalResourceId, + StackId: this.event.StackId, + RequestId: this.event.RequestId, + LogicalResourceId: this.event.LogicalResourceId, + NoEcho: false, + Data: response.data + }; + const responseBody = JSON.stringify(cfResponse); + console.log("Responding to CloudFormation", responseBody); + const parsedUrl = url.parse(this.event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: "PUT", + headers: { "content-type": "", "content-length": responseBody.length } + }; + return new Promise((resolve, reject) => { + try { + const request2 = https.request(requestOptions, resolve); + request2.on("error", reject); + request2.write(responseBody); + request2.end(); + } catch (e) { + reject(e); + } finally { + clearTimeout(this.timeout); + } + }); + } +}; +function extractPhysicalResourceId(event) { + switch (event.RequestType) { + case "Create": + return event.LogicalResourceId; + case "Update": + case "Delete": + return event.PhysicalResourceId; + } +} + +// lib/assertions/providers/lambda-handler/assertion.ts +var AssertionHandler = class extends CustomResourceHandler { + async processEvent(request2) { + let actual = decodeCall(request2.actual); + const expected = decodeCall(request2.expected); + let result; + const matcher = new MatchCreator(expected).getMatcher(); + console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`); + const matchResult = matcher.test(actual); + matchResult.finished(); + if (matchResult.hasFailed()) { + result = { + failed: true, + assertion: JSON.stringify({ + status: "fail", + message: [ + ...matchResult.toHumanStrings(), + JSON.stringify(matchResult.target, void 0, 2) + ].join("\n") + }) + }; + if (request2.failDeployment) { + throw new Error(result.assertion); + } + } else { + result = { + assertion: JSON.stringify({ + status: "success" + }) + }; + } + return result; + } +}; +var MatchCreator = class { + constructor(obj) { + this.parsedObj = { + matcher: obj + }; + } + getMatcher() { + try { + const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { + const nested = Object.keys(v)[0]; + switch (nested) { + case "$ArrayWith": + return Match.arrayWith(v[nested]); + case "$ObjectLike": + return Match.objectLike(v[nested]); + case "$StringLike": + return Match.stringLikeRegexp(v[nested]); + default: + return v; + } + }); + if (Matcher.isMatcher(final.matcher)) { + return final.matcher; + } + return Match.exact(final.matcher); + } catch { + return Match.exact(this.parsedObj.matcher); + } + } +}; +function decodeCall(call) { + if (!call) { + return void 0; + } + try { + const parsed = JSON.parse(call); + return parsed; + } catch (e) { + return call; + } +} + +// lib/assertions/providers/lambda-handler/utils.ts +function decode(object) { + return JSON.parse(JSON.stringify(object), (_k, v) => { + switch (v) { + case "TRUE:BOOLEAN": + return true; + case "FALSE:BOOLEAN": + return false; + default: + return v; + } + }); +} + +// lib/assertions/providers/lambda-handler/sdk.ts +function flatten(object) { + return Object.assign( + {}, + ...function _flatten(child, path = []) { + return [].concat(...Object.keys(child).map((key) => { + let childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key]; + if (typeof childKey === "string") { + childKey = isJsonString(childKey); + } + return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey }; + })); + }(object) + ); +} +var AwsApiCallHandler = class extends CustomResourceHandler { + async processEvent(request2) { + const AWS2 = require("aws-sdk"); + console.log(`AWS SDK VERSION: ${AWS2.VERSION}`); + if (!Object.prototype.hasOwnProperty.call(AWS2, request2.service)) { + throw Error(`Service ${request2.service} does not exist in AWS SDK version ${AWS2.VERSION}.`); + } + const service = new AWS2[request2.service](); + const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise(); + console.log(`SDK response received ${JSON.stringify(response)}`); + delete response.ResponseMetadata; + const respond = { + apiCallResponse: response + }; + const flatData = { + ...flatten(respond) + }; + const resp = request2.flattenResponse === "true" ? flatData : respond; + console.log(`Returning result ${JSON.stringify(resp)}`); + return resp; + } +}; +function isJsonString(value) { + try { + return JSON.parse(value); + } catch { + return value; + } +} + +// lib/assertions/providers/lambda-handler/types.ts +var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals"; +var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall"; + +// lib/assertions/providers/lambda-handler/index.ts +async function handler(event, context) { + console.log(`Event: ${JSON.stringify({ ...event, ResponseURL: "..." })}`); + const provider = createResourceHandler(event, context); + try { + if (event.RequestType === "Delete") { + await provider.respond({ + status: "SUCCESS", + reason: "OK" + }); + return; + } + const result = await provider.handle(); + if ("stateMachineArn" in event.ResourceProperties) { + console.info('Found "stateMachineArn", waiter statemachine started'); + return; + } else if ("expected" in event.ResourceProperties) { + console.info('Found "expected", testing assertions'); + const actualPath = event.ResourceProperties.actualPath; + const actual = actualPath ? result[`apiCallResponse.${actualPath}`] : result.apiCallResponse; + const assertion = new AssertionHandler({ + ...event, + ResourceProperties: { + ServiceToken: event.ServiceToken, + actual, + expected: event.ResourceProperties.expected + } + }, context); + try { + const assertionResult = await assertion.handle(); + await provider.respond({ + status: "SUCCESS", + reason: "OK", + data: { + ...assertionResult, + ...result + } + }); + return; + } catch (e) { + await provider.respond({ + status: "FAILED", + reason: e.message ?? "Internal Error" + }); + return; + } + } + await provider.respond({ + status: "SUCCESS", + reason: "OK", + data: result + }); + } catch (e) { + await provider.respond({ + status: "FAILED", + reason: e.message ?? "Internal Error" + }); + return; + } + return; +} +async function onTimeout(timeoutEvent) { + const isCompleteRequest = JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage); + const provider = createResourceHandler(isCompleteRequest, standardContext); + await provider.respond({ + status: "FAILED", + reason: "Operation timed out: " + JSON.stringify(isCompleteRequest) + }); +} +async function isComplete(event, context) { + console.log(`Event: ${JSON.stringify({ ...event, ResponseURL: "..." })}`); + const provider = createResourceHandler(event, context); + try { + const result = await provider.handleIsComplete(); + const actualPath = event.ResourceProperties.actualPath; + if (result) { + const actual = actualPath ? result[`apiCallResponse.${actualPath}`] : result.apiCallResponse; + if ("expected" in event.ResourceProperties) { + const assertion = new AssertionHandler({ + ...event, + ResourceProperties: { + ServiceToken: event.ServiceToken, + actual, + expected: event.ResourceProperties.expected + } + }, context); + const assertionResult = await assertion.handleIsComplete(); + if (!(assertionResult == null ? void 0 : assertionResult.failed)) { + await provider.respond({ + status: "SUCCESS", + reason: "OK", + data: { + ...assertionResult, + ...result + } + }); + return; + } else { + console.log(`Assertion Failed: ${JSON.stringify(assertionResult)}`); + throw new Error(JSON.stringify(event)); + } + } + await provider.respond({ + status: "SUCCESS", + reason: "OK", + data: result + }); + } else { + console.log("No result"); + throw new Error(JSON.stringify(event)); + } + return; + } catch (e) { + console.log(e); + throw new Error(JSON.stringify(event)); + } +} +function createResourceHandler(event, context) { + if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { + return new AwsApiCallHandler(event, context); + } else if (event.ResourceType.startsWith(ASSERT_RESOURCE_TYPE)) { + return new AssertionHandler(event, context); + } else { + throw new Error(`Unsupported resource type "${event.ResourceType}`); + } +} +var standardContext = { + getRemainingTimeInMillis: () => 9e4 +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + handler, + isComplete, + onTimeout +}); diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/cdk.out new file mode 100644 index 0000000000000..8ecc185e9dbee --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/integ.json b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/integ.json new file mode 100644 index 0000000000000..5c8c6510bd130 --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "21.0.0", + "testCases": { + "test/DefaultTest": { + "stacks": [ + "ProfilingGroupTestStack" + ], + "assertionStack": "test/DefaultTest/DeployAssert", + "assertionStackName": "testDefaultTestDeployAssert4D02624A" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/manifest.json new file mode 100644 index 0000000000000..02f064057aa9b --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/manifest.json @@ -0,0 +1,165 @@ +{ + "version": "21.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "ProfilingGroupTestStack.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "ProfilingGroupTestStack.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "ProfilingGroupTestStack": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "ProfilingGroupTestStack.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/49d6a3151509f39124c2f82b21cf55a8a1364289fce8b6f8b764af6e204c6647.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "ProfilingGroupTestStack.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "ProfilingGroupTestStack.assets" + ], + "metadata": { + "/ProfilingGroupTestStack/ProfilingGroupWithExplicitlySetName/ProfilingGroup": [ + { + "type": "aws:cdk:logicalId", + "data": "ProfilingGroupWithExplicitlySetNameProfilingGroup20552EAE" + } + ], + "/ProfilingGroupTestStack/ProfilingGroupWithImplicitlySetName/ProfilingGroup": [ + { + "type": "aws:cdk:logicalId", + "data": "ProfilingGroupWithImplicitlySetNameProfilingGroup21CDF1FC" + } + ], + "/ProfilingGroupTestStack/PublishAppRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublishAppRole9FEBD682" + } + ], + "/ProfilingGroupTestStack/PublishAppRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PublishAppRoleDefaultPolicyCA1E15C3" + } + ], + "/ProfilingGroupTestStack/ExplicitlySetProfilingGroupName": [ + { + "type": "aws:cdk:logicalId", + "data": "ExplicitlySetProfilingGroupName" + } + ], + "/ProfilingGroupTestStack/ImplicitlySetProfilingGroupName": [ + { + "type": "aws:cdk:logicalId", + "data": "ImplicitlySetProfilingGroupName" + } + ], + "/ProfilingGroupTestStack/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/ProfilingGroupTestStack/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "ProfilingGroupTestStack" + }, + "testDefaultTestDeployAssert4D02624A.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "testDefaultTestDeployAssert4D02624A.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "testDefaultTestDeployAssert4D02624A": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "testDefaultTestDeployAssert4D02624A.template.json", + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1b75a24a1fbadc3d6a873d4f5887182847cd2459da973a4e19f416cccdf0b7bf.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "testDefaultTestDeployAssert4D02624A.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "testDefaultTestDeployAssert4D02624A.assets" + ], + "metadata": { + "/test/DefaultTest/DeployAssert/AwsApiCallCloudFormationdescribeStacks/Default/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "AwsApiCallCloudFormationdescribeStacks" + } + ], + "/test/DefaultTest/DeployAssert/AwsApiCallCloudFormationdescribeStacks/AssertionResults": [ + { + "type": "aws:cdk:logicalId", + "data": "AssertionResultsAwsApiCallCloudFormationdescribeStacks" + } + ], + "/test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" + } + ], + "/test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" + } + ], + "/test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "test/DefaultTest/DeployAssert" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/testDefaultTestDeployAssert4D02624A.assets.json b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/testDefaultTestDeployAssert4D02624A.assets.json new file mode 100644 index 0000000000000..3774d68fead2a --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/testDefaultTestDeployAssert4D02624A.assets.json @@ -0,0 +1,32 @@ +{ + "version": "21.0.0", + "files": { + "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": { + "source": { + "path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "1b75a24a1fbadc3d6a873d4f5887182847cd2459da973a4e19f416cccdf0b7bf": { + "source": { + "path": "testDefaultTestDeployAssert4D02624A.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "1b75a24a1fbadc3d6a873d4f5887182847cd2459da973a4e19f416cccdf0b7bf.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/testDefaultTestDeployAssert4D02624A.template.json b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/testDefaultTestDeployAssert4D02624A.template.json new file mode 100644 index 0000000000000..7cdb4ee653a71 --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/testDefaultTestDeployAssert4D02624A.template.json @@ -0,0 +1,131 @@ +{ + "Resources": { + "AwsApiCallCloudFormationdescribeStacks": { + "Type": "Custom::DeployAssert@SdkCallCloudFormationdescribeStacks", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "CloudFormation", + "api": "describeStacks", + "expected": "{\"$StringLike\":\"ProfilingGroupTestStackProfilingGroupWithImplicitlySetName98463923\"}", + "actualPath": "Stacks.0.Outputs.1.OutputValue", + "parameters": { + "StackName": "ProfilingGroupTestStack" + }, + "flattenResponse": "true", + "salt": "1666215338046" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ], + "Policies": [ + { + "PolicyName": "Inline", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "cloudformation:DescribeStacks" + ], + "Effect": "Allow", + "Resource": [ + "*" + ] + } + ] + } + } + ] + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Runtime": "nodejs14.x", + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip" + }, + "Timeout": 120, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", + "Arn" + ] + } + } + } + }, + "Outputs": { + "AssertionResultsAwsApiCallCloudFormationdescribeStacks": { + "Value": { + "Fn::GetAtt": [ + "AwsApiCallCloudFormationdescribeStacks", + "assertion" + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/tree.json b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/tree.json new file mode 100644 index 0000000000000..a013f53091526 --- /dev/null +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiler-group-import-functions.integ.snapshot/tree.json @@ -0,0 +1,342 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.129" + } + }, + "ProfilingGroupTestStack": { + "id": "ProfilingGroupTestStack", + "path": "ProfilingGroupTestStack", + "children": { + "ProfilingGroupWithExplicitlySetName": { + "id": "ProfilingGroupWithExplicitlySetName", + "path": "ProfilingGroupTestStack/ProfilingGroupWithExplicitlySetName", + "children": { + "ProfilingGroup": { + "id": "ProfilingGroup", + "path": "ProfilingGroupTestStack/ProfilingGroupWithExplicitlySetName/ProfilingGroup", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeGuruProfiler::ProfilingGroup", + "aws:cdk:cloudformation:props": { + "profilingGroupName": "ExplicitlySetName" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codeguruprofiler.CfnProfilingGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codeguruprofiler.ProfilingGroup", + "version": "0.0.0" + } + }, + "ProfilingGroupWithImplicitlySetName": { + "id": "ProfilingGroupWithImplicitlySetName", + "path": "ProfilingGroupTestStack/ProfilingGroupWithImplicitlySetName", + "children": { + "ProfilingGroup": { + "id": "ProfilingGroup", + "path": "ProfilingGroupTestStack/ProfilingGroupWithImplicitlySetName/ProfilingGroup", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodeGuruProfiler::ProfilingGroup", + "aws:cdk:cloudformation:props": { + "profilingGroupName": "ProfilingGroupTestStackProfilingGroupWithImplicitlySetName98463923" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codeguruprofiler.CfnProfilingGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-codeguruprofiler.ProfilingGroup", + "version": "0.0.0" + } + }, + "PublishAppRole": { + "id": "PublishAppRole", + "path": "ProfilingGroupTestStack/PublishAppRole", + "children": { + "Resource": { + "id": "Resource", + "path": "ProfilingGroupTestStack/PublishAppRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "ProfilingGroupTestStack/PublishAppRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "ProfilingGroupTestStack/PublishAppRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "codeguru-profiler:ConfigureAgent", + "codeguru-profiler:PostAgentProfile" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "ProfilingGroupWithExplicitlySetNameProfilingGroup20552EAE", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "ProfilingGroupWithImplicitlySetNameProfilingGroup21CDF1FC", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "PublishAppRoleDefaultPolicyCA1E15C3", + "roles": [ + { + "Ref": "PublishAppRole9FEBD682" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.Role", + "version": "0.0.0" + } + }, + "ImportedProfilingGroupWithExplicitlySetName": { + "id": "ImportedProfilingGroupWithExplicitlySetName", + "path": "ProfilingGroupTestStack/ImportedProfilingGroupWithExplicitlySetName", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "ImportedProfilingGroupWithImplicitlySetName": { + "id": "ImportedProfilingGroupWithImplicitlySetName", + "path": "ProfilingGroupTestStack/ImportedProfilingGroupWithImplicitlySetName", + "constructInfo": { + "fqn": "@aws-cdk/core.Resource", + "version": "0.0.0" + } + }, + "ExplicitlySetProfilingGroupName": { + "id": "ExplicitlySetProfilingGroupName", + "path": "ProfilingGroupTestStack/ExplicitlySetProfilingGroupName", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + }, + "ImplicitlySetProfilingGroupName": { + "id": "ImplicitlySetProfilingGroupName", + "path": "ProfilingGroupTestStack/ImplicitlySetProfilingGroupName", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + }, + "test": { + "id": "test", + "path": "test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.129" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "test/DefaultTest/DeployAssert", + "children": { + "AwsApiCallCloudFormationdescribeStacks": { + "id": "AwsApiCallCloudFormationdescribeStacks", + "path": "test/DefaultTest/DeployAssert/AwsApiCallCloudFormationdescribeStacks", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "test/DefaultTest/DeployAssert/AwsApiCallCloudFormationdescribeStacks/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "test/DefaultTest/DeployAssert/AwsApiCallCloudFormationdescribeStacks/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.129" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "test/DefaultTest/DeployAssert/AwsApiCallCloudFormationdescribeStacks/Default", + "children": { + "Default": { + "id": "Default", + "path": "test/DefaultTest/DeployAssert/AwsApiCallCloudFormationdescribeStacks/Default/Default", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.CustomResource", + "version": "0.0.0" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "test/DefaultTest/DeployAssert/AwsApiCallCloudFormationdescribeStacks/AssertionResults", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnOutput", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AwsApiCall", + "version": "0.0.0" + } + }, + "SingletonFunction1488541a7b23466481b69b4408076b81": { + "id": "SingletonFunction1488541a7b23466481b69b4408076b81", + "path": "test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", + "children": { + "Staging": { + "id": "Staging", + "path": "test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", + "constructInfo": { + "fqn": "@aws-cdk/core.AssetStaging", + "version": "0.0.0" + } + }, + "Role": { + "id": "Role", + "path": "test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + }, + "Handler": { + "id": "Handler", + "path": "test/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", + "constructInfo": { + "fqn": "@aws-cdk/core.CfnResource", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.129" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.IntegTest", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/test/profiling-group.test.ts b/packages/@aws-cdk/aws-codeguruprofiler/test/profiling-group.test.ts index 94f54c65945c4..12686fce4b6de 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/test/profiling-group.test.ts +++ b/packages/@aws-cdk/aws-codeguruprofiler/test/profiling-group.test.ts @@ -169,6 +169,13 @@ describe('profiling group', () => { }); }); + test('use name specified via fromProfilingGroupName', () => { + const stack = new Stack(); + + const profilingGroup = ProfilingGroup.fromProfilingGroupName(stack, 'MyProfilingGroup', 'MyAwesomeProfilingGroup'); + expect(profilingGroup.profilingGroupName).toEqual('MyAwesomeProfilingGroup'); + }); + test('default profiling group', () => { const stack = new Stack(); new ProfilingGroup(stack, 'MyProfilingGroup', { From 7b47f4178e4a4b9fe3dcb54daa3ec9f94fbd2a31 Mon Sep 17 00:00:00 2001 From: Masashi Tomooka Date: Thu, 20 Oct 2022 08:54:25 +0900 Subject: [PATCH 6/8] fix(cli): hotswap deploy fails on multiple CfnEvaluationException (#22339) closes #22323 To avoid unhandled rejections, we run promises just before we call `Promise.all`. The concern of this fix is that hotswap process may take longer time because now async tasks run lazily. However I don't think it will be a big problem since those tasks are not I/O bound, so most of them are already running sequentially, not in parallel. ---- ### All Submissions: * [X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cdk/lib/api/hotswap-deployments.ts | 7 +- .../api/hotswap/hotswap-deployments.test.ts | 87 +++++++++++++++++++ 2 files changed, 91 insertions(+), 3 deletions(-) diff --git a/packages/aws-cdk/lib/api/hotswap-deployments.ts b/packages/aws-cdk/lib/api/hotswap-deployments.ts index 487d8a1dd2281..35305eee57dcf 100644 --- a/packages/aws-cdk/lib/api/hotswap-deployments.ts +++ b/packages/aws-cdk/lib/api/hotswap-deployments.ts @@ -76,7 +76,7 @@ async function findAllHotswappableChanges( const resourceDifferences = getStackResourceDifferences(stackChanges); let foundNonHotswappableChange = false; - const promises: Array>> = []; + const promises: Array<() => Array>> = []; const hotswappableResources = new Array(); // gather the results of the detector functions @@ -97,7 +97,8 @@ async function findAllHotswappableChanges( } else if (resourceHotswapEvaluation === ChangeHotswapImpact.IRRELEVANT) { // empty 'if' just for flow-aware typing to kick in... } else { - promises.push([ + // run isHotswappable* functions lazily to prevent unhandled rejections + promises.push(() => [ isHotswappableLambdaFunctionChange(logicalId, resourceHotswapEvaluation, evaluateCfnTemplate), isHotswappableStateMachineChange(logicalId, resourceHotswapEvaluation, evaluateCfnTemplate), isHotswappableEcsServiceChange(logicalId, resourceHotswapEvaluation, evaluateCfnTemplate), @@ -111,7 +112,7 @@ async function findAllHotswappableChanges( // resolve all detector results const changesDetectionResults: Array> = []; for (const detectorResultPromises of promises) { - const hotswapDetectionResults = await Promise.all(detectorResultPromises); + const hotswapDetectionResults = await Promise.all(detectorResultPromises()); changesDetectionResults.push(hotswapDetectionResults); } diff --git a/packages/aws-cdk/test/api/hotswap/hotswap-deployments.test.ts b/packages/aws-cdk/test/api/hotswap/hotswap-deployments.test.ts index 4c3bd67ee764c..cb2e2a77e8f65 100644 --- a/packages/aws-cdk/test/api/hotswap/hotswap-deployments.test.ts +++ b/packages/aws-cdk/test/api/hotswap/hotswap-deployments.test.ts @@ -1,4 +1,5 @@ import { Lambda, StepFunctions } from 'aws-sdk'; +import { CfnEvaluationException } from '../../../lib/api/evaluate-cloudformation-template'; import * as setup from './hotswap-test-setup'; let hotswapMockSdkProvider: setup.HotswapMockSdkProvider; @@ -414,3 +415,89 @@ test('A change to both a hotswappable resource and a stack output results in a f expect(mockUpdateMachineDefinition).not.toHaveBeenCalled(); expect(mockUpdateLambdaCode).not.toHaveBeenCalled(); }); + +test('Multiple CfnEvaluationException will not cause unhandled rejections', async () => { + // GIVEN + setup.setCurrentCfnStackTemplate({ + Resources: { + Func1: { + Type: 'AWS::Lambda::Function', + Properties: { + Code: { + S3Bucket: 'current-bucket', + S3Key: 'current-key', + }, + Environment: { + key: 'old', + }, + FunctionName: 'my-function', + }, + Metadata: { + 'aws:asset:path': 'old-path', + }, + }, + Func2: { + Type: 'AWS::Lambda::Function', + Properties: { + Code: { + S3Bucket: 'current-bucket', + S3Key: 'current-key', + }, + Environment: { + key: 'old', + }, + FunctionName: 'my-function', + }, + Metadata: { + 'aws:asset:path': 'old-path', + }, + }, + }, + }); + const cdkStackArtifact = setup.cdkStackArtifactOf({ + template: { + Resources: { + Func1: { + Type: 'AWS::Lambda::Function', + Properties: { + Code: { + S3Bucket: 'current-bucket', + S3Key: 'current-key', + }, + Environment: { + key: { Ref: 'ErrorResource' }, + }, + FunctionName: 'my-function', + }, + Metadata: { + 'aws:asset:path': 'new-path', + }, + }, + Func2: { + Type: 'AWS::Lambda::Function', + Properties: { + Code: { + S3Bucket: 'current-bucket', + S3Key: 'current-key', + }, + Environment: { + key: { Ref: 'ErrorResource' }, + }, + FunctionName: 'my-function', + }, + Metadata: { + 'aws:asset:path': 'new-path', + }, + }, + }, + }, + }); + + // WHEN + const deployStackResult = hotswapMockSdkProvider.tryHotswapDeployment(cdkStackArtifact); + + // THEN + await expect(deployStackResult).rejects.toThrowError(CfnEvaluationException); + expect(mockUpdateMachineDefinition).not.toHaveBeenCalled(); + expect(mockUpdateLambdaCode).not.toHaveBeenCalled(); +}); From be6074a67b68ec2f295196ad73ddb6e92984bdf3 Mon Sep 17 00:00:00 2001 From: Mitchell Valine Date: Wed, 19 Oct 2022 19:16:57 -0700 Subject: [PATCH 7/8] fix: breaking change to deployment config props (#22567) Change all `deploymentConfig` static method implementations on `EcsDeploymentConfig`, `LambdaDeploymentConfig`, and `ServerDeploymentConfig` to return their corresponding specific interfaces instead of `IBaseDeploymentConfig`. This reverts breaking changes to Java users introduced in https://github.com/aws/aws-cdk/pull/22159 Fixes #22566 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-codedeploy/lib/base-deployment-config.ts | 13 ------------- .../aws-codedeploy/lib/ecs/deployment-config.ts | 5 +++++ .../aws-codedeploy/lib/lambda/deployment-config.ts | 5 +++++ .../aws-codedeploy/lib/server/deployment-config.ts | 5 +++++ packages/@aws-cdk/aws-codedeploy/lib/utils.ts | 8 ++++++++ 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/packages/@aws-cdk/aws-codedeploy/lib/base-deployment-config.ts b/packages/@aws-cdk/aws-codedeploy/lib/base-deployment-config.ts index 0cd04ae3628c5..35c0c453cc7c2 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/base-deployment-config.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/base-deployment-config.ts @@ -109,19 +109,6 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl }; } - /** - * This method should be used only for static references to predefined deployment configurations, - * like EcsDeploymentConfig.ALL_AT_ONCE - * @param name the name of the referenced custom Deployment Configuration - * @returns a reference to an existing custom Deployment Configuration - */ - protected static deploymentConfig(name: string): IBaseDeploymentConfig { - return { - deploymentConfigName: name, - deploymentConfigArn: arnForDeploymentConfig(name), - }; - } - /** * The name of the deployment config * @attribute diff --git a/packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-config.ts b/packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-config.ts index cd1f96aa50945..be6204b4b10ad 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-config.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-config.ts @@ -1,6 +1,7 @@ import { Construct } from 'constructs'; import { BaseDeploymentConfig, BaseDeploymentConfigOptions, ComputePlatform, IBaseDeploymentConfig } from '../base-deployment-config'; import { TrafficRouting } from '../traffic-routing-config'; +import { deploymentConfig } from '../utils'; /** * The Deployment Configuration of an ECS Deployment Group. @@ -59,6 +60,10 @@ export class EcsDeploymentConfig extends BaseDeploymentConfig implements IEcsDep return this.fromDeploymentConfigName(scope, id, ecsDeploymentConfigName); } + private static deploymentConfig(name: string): IEcsDeploymentConfig { + return deploymentConfig(name); + } + public constructor(scope: Construct, id: string, props?: EcsDeploymentConfigProps) { super(scope, id, { ...props, diff --git a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-config.ts b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-config.ts index 18690f239d820..a86da3222b5f1 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-config.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-config.ts @@ -1,6 +1,7 @@ import { Construct } from 'constructs'; import { BaseDeploymentConfig, BaseDeploymentConfigOptions, ComputePlatform, IBaseDeploymentConfig } from '../base-deployment-config'; import { TrafficRouting } from '../traffic-routing-config'; +import { deploymentConfig } from '../utils'; /** * The Deployment Configuration of a Lambda Deployment Group. @@ -92,6 +93,10 @@ export class LambdaDeploymentConfig extends BaseDeploymentConfig implements ILam return this.fromLambdaDeploymentConfigName(_scope, _id, props.deploymentConfigName); } + private static deploymentConfig(name: string): ILambdaDeploymentConfig { + return deploymentConfig(name); + } + public constructor(scope: Construct, id: string, props?: LambdaDeploymentConfigProps) { super(scope, id, { ...props, diff --git a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-config.ts b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-config.ts index 97a9357cbe0bc..c3ae4a75ffb59 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-config.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/server/deployment-config.ts @@ -1,6 +1,7 @@ import { Construct } from 'constructs'; import { BaseDeploymentConfig, BaseDeploymentConfigOptions, IBaseDeploymentConfig } from '../base-deployment-config'; import { MinimumHealthyHosts } from '../host-health-config'; +import { deploymentConfig } from '../utils'; /** * The Deployment Configuration of an EC2/on-premise Deployment Group. @@ -63,6 +64,10 @@ export class ServerDeploymentConfig extends BaseDeploymentConfig implements ISer return this.fromDeploymentConfigName(scope, id, serverDeploymentConfigName); } + private static deploymentConfig(name: string): IServerDeploymentConfig { + return deploymentConfig(name); + } + constructor(scope: Construct, id: string, props: ServerDeploymentConfigProps) { super(scope, id, props); } diff --git a/packages/@aws-cdk/aws-codedeploy/lib/utils.ts b/packages/@aws-cdk/aws-codedeploy/lib/utils.ts index 834e5afb506e9..137998a23eb37 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/utils.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/utils.ts @@ -1,5 +1,6 @@ import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import { Aws, Token } from '@aws-cdk/core'; +import { IBaseDeploymentConfig } from './base-deployment-config'; import { CfnDeploymentGroup } from './codedeploy.generated'; import { AutoRollbackConfig } from './rollback-config'; @@ -26,6 +27,13 @@ CfnDeploymentGroup.AlarmConfigurationProperty | undefined { }; } +export function deploymentConfig(name: string): IBaseDeploymentConfig { + return { + deploymentConfigName: name, + deploymentConfigArn: arnForDeploymentConfig(name), + }; +} + enum AutoRollbackEvent { DEPLOYMENT_FAILURE = 'DEPLOYMENT_FAILURE', DEPLOYMENT_STOP_ON_ALARM = 'DEPLOYMENT_STOP_ON_ALARM', From 4b3371b4e66ab537a9424f4c78d72a131a169f5b Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Thu, 20 Oct 2022 12:21:27 +0000 Subject: [PATCH 8/8] chore(release): 2.47.0 --- CHANGELOG.v2.alpha.md | 13 +++++++++++++ CHANGELOG.v2.md | 22 ++++++++++++++++++++++ version.v2.json | 4 ++-- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.v2.alpha.md b/CHANGELOG.v2.alpha.md index 3c0628850a673..b5a9877e789c6 100644 --- a/CHANGELOG.v2.alpha.md +++ b/CHANGELOG.v2.alpha.md @@ -2,6 +2,19 @@ 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. +## [2.47.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.46.0-alpha.0...v2.47.0-alpha.0) (2022-10-20) + + +### Features + +* **redshift:** support enhanced vpc routing when creating redshift cluster ([#22499](https://github.com/aws/aws-cdk/issues/22499)) ([e2b18e7](https://github.com/aws/aws-cdk/commit/e2b18e7b47eb7a87ae37356a9719c055e58e6e6c)) + + +### Bug Fixes + +* **integ-runner:** Fix call to spawnSync for hooks commands ([#22429](https://github.com/aws/aws-cdk/issues/22429)) ([9139ca9](https://github.com/aws/aws-cdk/commit/9139ca96ffc010e13393aff927d7b7eacfbae4f9)), closes [#22344](https://github.com/aws/aws-cdk/issues/22344) +* **lambda-python:** root-owned cache items not cleaned up after install ([#22512](https://github.com/aws/aws-cdk/issues/22512)) ([5ef65e0](https://github.com/aws/aws-cdk/commit/5ef65e042c747bedf9d770b47e540393454762f2)), closes [#22398](https://github.com/aws/aws-cdk/issues/22398) + ## [2.46.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.45.0-alpha.0...v2.46.0-alpha.0) (2022-10-13) diff --git a/CHANGELOG.v2.md b/CHANGELOG.v2.md index 9c571a6f0003f..b98cc92a87776 100644 --- a/CHANGELOG.v2.md +++ b/CHANGELOG.v2.md @@ -2,6 +2,28 @@ 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. +## [2.47.0](https://github.com/aws/aws-cdk/compare/v2.46.0...v2.47.0) (2022-10-20) + + +### Features + +* **apigateway:** support multi-level paths for custom domains ([#22463](https://github.com/aws/aws-cdk/issues/22463)) ([cdc5753](https://github.com/aws/aws-cdk/commit/cdc5753982d8f674dab2362ea63790abb736fa32)), closes [#15904](https://github.com/aws/aws-cdk/issues/15904) +* **config:** add custom policy rule constructs ([#21794](https://github.com/aws/aws-cdk/issues/21794)) ([09a5cc4](https://github.com/aws/aws-cdk/commit/09a5cc4ff55cb7d001c14059c12ada0a2801acd4)), closes [#21441](https://github.com/aws/aws-cdk/issues/21441) +* **elbv2:** add dropInvalidHeaderFields for elbv2 ([#22466](https://github.com/aws/aws-cdk/issues/22466)) ([91767f0](https://github.com/aws/aws-cdk/commit/91767f03e76db8a63c18882b44854999b15aaff4)), closes [/docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-fsbp-controls.html#fsbp-elb-4](https://github.com/aws//docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-fsbp-controls.html/issues/fsbp-elb-4) + + +### Bug Fixes + +* breaking change to deployment config props ([#22567](https://github.com/aws/aws-cdk/issues/22567)) ([be6074a](https://github.com/aws/aws-cdk/commit/be6074a67b68ec2f295196ad73ddb6e92984bdf3)), closes [#22566](https://github.com/aws/aws-cdk/issues/22566) +* **apigateway:** validation for path parts does not allow creation of resources with colon ([#22531](https://github.com/aws/aws-cdk/issues/22531)) ([73c443a](https://github.com/aws/aws-cdk/commit/73c443a7cd14ad27776907095bf19100e903093f)), closes [#22477](https://github.com/aws/aws-cdk/issues/22477) [#22477](https://github.com/aws/aws-cdk/issues/22477) +* **cli:** hotswap deploy fails on multiple CfnEvaluationException ([#22339](https://github.com/aws/aws-cdk/issues/22339)) ([7b47f41](https://github.com/aws/aws-cdk/commit/7b47f4178e4a4b9fe3dcb54daa3ec9f94fbd2a31)), closes [#22323](https://github.com/aws/aws-cdk/issues/22323) +* **cloudwatch:** remove region from dashboard ARN ([#22524](https://github.com/aws/aws-cdk/issues/22524)) ([558d192](https://github.com/aws/aws-cdk/commit/558d1925d7c3b01d7681e28f7b85bc851e403556)) +* **codeguruprofiler:** incorrect profiling group name is returned when using importing ([#22554](https://github.com/aws/aws-cdk/issues/22554)) ([9934619](https://github.com/aws/aws-cdk/commit/9934619970dcb582106e9b2bf0d373d730de1fee)) +* **cognito:** cannot use same lambda function as trigger in multiple user pools ([#22444](https://github.com/aws/aws-cdk/issues/22444)) ([b26fc00](https://github.com/aws/aws-cdk/commit/b26fc007465ce9466cecfaf5c0bb337d741c77e8)), closes [#22315](https://github.com/aws/aws-cdk/issues/22315) +* **config:** Creating multiple rules from the same lambda ([#21594](https://github.com/aws/aws-cdk/issues/21594)) ([0d2b529](https://github.com/aws/aws-cdk/commit/0d2b5291a10a318bed8d77166eae2bd317dee62e)), closes [#17582](https://github.com/aws/aws-cdk/issues/17582) +* **iam:** missing validation for actions added post instantiation of a policy statement ([#21906](https://github.com/aws/aws-cdk/issues/21906)) ([10974d9](https://github.com/aws/aws-cdk/commit/10974d95693dd75e993b8f0b5808b775b55b3afd)), closes [40aws-cdk/aws-iam/lib/policy-statement.ts#L88-L95](https://github.com/40aws-cdk/aws-iam/lib/policy-statement.ts/issues/L88-L95) +* **stepfunctions:** JsonPath.listAt does not accept strings starting with `$[` ([#22472](https://github.com/aws/aws-cdk/issues/22472)) ([6f332ef](https://github.com/aws/aws-cdk/commit/6f332efb1ae5c22f1c3b02221362018e3f4b575f)), closes [#22471](https://github.com/aws/aws-cdk/issues/22471) + ## [2.46.0](https://github.com/aws/aws-cdk/compare/v2.45.0...v2.46.0) (2022-10-13) diff --git a/version.v2.json b/version.v2.json index 29602b6083680..0481ac5346ad4 100644 --- a/version.v2.json +++ b/version.v2.json @@ -1,4 +1,4 @@ { - "version": "2.46.0", - "alphaVersion": "2.46.0-alpha.0" + "version": "2.47.0", + "alphaVersion": "2.47.0-alpha.0" } \ No newline at end of file