From f858260738399359953b57aaec6866824b161c1f Mon Sep 17 00:00:00 2001 From: Michael Sambol Date: Mon, 27 Nov 2023 06:03:48 -0800 Subject: [PATCH 1/5] fix(s3): lifecycle rule dates require trailing Z --- .../aws-cdk-s3.assets.json | 6 ++--- .../aws-cdk-s3.template.json | 4 +-- .../test/integ.lifecycle.js.snapshot/cdk.out | 2 +- ...efaultTestDeployAssert83FA03B1.assets.json | 2 +- .../integ.lifecycle.js.snapshot/integ.json | 2 +- .../integ.lifecycle.js.snapshot/manifest.json | 6 +++-- .../integ.lifecycle.js.snapshot/tree.json | 26 +++++++++---------- .../test/aws-s3/test/integ.lifecycle.ts | 2 +- .../cli-lib-alpha/THIRD_PARTY_LICENSES | 6 ++--- packages/aws-cdk-lib/core/lib/runtime.ts | 2 +- 10 files changed, 30 insertions(+), 28 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/aws-cdk-s3.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/aws-cdk-s3.assets.json index d0a5cb96b7665..bef0d40be9d43 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/aws-cdk-s3.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/aws-cdk-s3.assets.json @@ -1,7 +1,7 @@ { - "version": "30.1.0", + "version": "35.0.0", "files": { - "ec43659201be5ffe7c1311b82c63224f177655acd30be0d6f1b0b377a9915825": { + "fb987ebc34677fecb865b4119e0a8425886b44c34ab79e47c07ce1b603cb700f": { "source": { "path": "aws-cdk-s3.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ec43659201be5ffe7c1311b82c63224f177655acd30be0d6f1b0b377a9915825.json", + "objectKey": "fb987ebc34677fecb865b4119e0a8425886b44c34ab79e47c07ce1b603cb700f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/aws-cdk-s3.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/aws-cdk-s3.template.json index 532ecd5185772..42d26405a5f83 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/aws-cdk-s3.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/aws-cdk-s3.template.json @@ -6,11 +6,11 @@ "LifecycleConfiguration": { "Rules": [ { - "ExpirationDate": "2019-10-01T00:00:00", + "ExpirationDate": "2019-10-01T00:00:00Z", "Status": "Enabled" }, { - "ExpirationDate": "2019-10-01T00:00:00", + "ExpirationDate": "2019-10-01T00:00:00Z", "ObjectSizeGreaterThan": 500, "ObjectSizeLessThan": 600, "Status": "Enabled" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/cdk.out index b72fef144f05c..c5cb2e5de6344 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"30.1.0"} \ No newline at end of file +{"version":"35.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/cdkinteglifecycleDefaultTestDeployAssert83FA03B1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/cdkinteglifecycleDefaultTestDeployAssert83FA03B1.assets.json index dbb0b2c6c9725..43a958740d685 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/cdkinteglifecycleDefaultTestDeployAssert83FA03B1.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/cdkinteglifecycleDefaultTestDeployAssert83FA03B1.assets.json @@ -1,5 +1,5 @@ { - "version": "30.1.0", + "version": "35.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/integ.json index 913066fd7cda7..fa17abc4ce7ac 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "30.1.0", + "version": "35.0.0", "testCases": { "cdk-integ-lifecycle/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/manifest.json index 07b06677e1601..5de3f028c9a20 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "30.1.0", + "version": "35.0.0", "artifacts": { "aws-cdk-s3.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-cdk-s3.template.json", + "terminationProtection": false, "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}/ec43659201be5ffe7c1311b82c63224f177655acd30be0d6f1b0b377a9915825.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fb987ebc34677fecb865b4119e0a8425886b44c34ab79e47c07ce1b603cb700f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -67,6 +68,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "cdkinteglifecycleDefaultTestDeployAssert83FA03B1.template.json", + "terminationProtection": false, "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}", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/tree.json index 9f6808d78e9b5..51bd103f14d87 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.js.snapshot/tree.json @@ -35,13 +35,13 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.CfnBucket", + "fqn": "aws-cdk-lib.aws_s3.CfnBucket", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-s3.Bucket", + "fqn": "aws-cdk-lib.aws_s3.Bucket", "version": "0.0.0" } }, @@ -49,7 +49,7 @@ "id": "BootstrapVersion", "path": "aws-cdk-s3/BootstrapVersion", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", + "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" } }, @@ -57,13 +57,13 @@ "id": "CheckBootstrapVersion", "path": "aws-cdk-s3/CheckBootstrapVersion", "constructInfo": { - "fqn": "@aws-cdk/core.CfnRule", + "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", + "fqn": "aws-cdk-lib.Stack", "version": "0.0.0" } }, @@ -80,7 +80,7 @@ "path": "cdk-integ-lifecycle/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.252" + "version": "10.3.0" } }, "DeployAssert": { @@ -91,7 +91,7 @@ "id": "BootstrapVersion", "path": "cdk-integ-lifecycle/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", + "fqn": "aws-cdk-lib.CfnParameter", "version": "0.0.0" } }, @@ -99,25 +99,25 @@ "id": "CheckBootstrapVersion", "path": "cdk-integ-lifecycle/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "@aws-cdk/core.CfnRule", + "fqn": "aws-cdk-lib.CfnRule", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", + "fqn": "aws-cdk-lib.Stack", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/integ-tests.IntegTestCase", + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/integ-tests.IntegTest", + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", "version": "0.0.0" } }, @@ -126,12 +126,12 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.252" + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", + "fqn": "aws-cdk-lib.App", "version": "0.0.0" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.ts index d77f26f742559..2bb95e3e135a7 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.ts @@ -23,4 +23,4 @@ new Bucket(stack, 'MyBucket', { new IntegTest(app, 'cdk-integ-lifecycle', { testCases: [stack], -}); \ No newline at end of file +}); diff --git a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES index 4fc8eaf268c73..ad862cd67eb28 100644 --- a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES +++ b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES @@ -207,7 +207,7 @@ The @aws-cdk/cli-lib-alpha package includes the following third-party software/l ---------------- -** @jsii/check-node@1.91.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.91.0 | Apache-2.0 +** @jsii/check-node@1.92.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.92.0 | Apache-2.0 jsii Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -471,7 +471,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE ---------------- -** aws-sdk@2.1492.0 - https://www.npmjs.com/package/aws-sdk/v/2.1492.0 | Apache-2.0 +** aws-sdk@2.1498.0 - https://www.npmjs.com/package/aws-sdk/v/2.1498.0 | Apache-2.0 AWS SDK for JavaScript Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -668,7 +668,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ---------------- -** cdk-from-cfn@0.67.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.67.0 | MIT OR Apache-2.0 +** cdk-from-cfn@0.69.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.69.0 | MIT OR Apache-2.0 ---------------- diff --git a/packages/aws-cdk-lib/core/lib/runtime.ts b/packages/aws-cdk-lib/core/lib/runtime.ts index edf8aa44ac141..2da488d6805c2 100644 --- a/packages/aws-cdk-lib/core/lib/runtime.ts +++ b/packages/aws-cdk-lib/core/lib/runtime.ts @@ -32,7 +32,7 @@ export function dateToCloudFormation(x?: Date): any { } // eslint-disable-next-line max-len - return `${x.getUTCFullYear()}-${pad(x.getUTCMonth() + 1)}-${pad(x.getUTCDate())}T${pad(x.getUTCHours())}:${pad(x.getUTCMinutes())}:${pad(x.getUTCSeconds())}`; + return `${x.getUTCFullYear()}-${pad(x.getUTCMonth() + 1)}-${pad(x.getUTCDate())}T${pad(x.getUTCHours())}:${pad(x.getUTCMinutes())}:${pad(x.getUTCSeconds())}Z`; } /** From b70863779636ec5d88eece197a3092d386421c33 Mon Sep 17 00:00:00 2001 From: Michael Sambol Date: Mon, 27 Nov 2023 06:24:08 -0800 Subject: [PATCH 2/5] fix test --- packages/aws-cdk-lib/aws-s3/test/rules.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-s3/test/rules.test.ts b/packages/aws-cdk-lib/aws-s3/test/rules.test.ts index 25a45a6ea344f..668c84afce1f0 100644 --- a/packages/aws-cdk-lib/aws-s3/test/rules.test.ts +++ b/packages/aws-cdk-lib/aws-s3/test/rules.test.ts @@ -106,7 +106,7 @@ describe('rules', () => { Template.fromStack(stack).hasResourceProperties('AWS::S3::Bucket', { LifecycleConfiguration: { Rules: [{ - ExpirationDate: '2018-01-01T00:00:00', + ExpirationDate: '2018-01-01T00:00:00Z', Status: 'Enabled', }], }, From 27cf4d1de301dc22d4a7057265c5198ec3ae65e0 Mon Sep 17 00:00:00 2001 From: Michael Sambol Date: Tue, 28 Nov 2023 05:32:56 -0800 Subject: [PATCH 3/5] add int test for autoscaling --- .../aws-lambda-autoscaling.assets.json | 6 +- .../aws-lambda-autoscaling.template.json | 9 ++ .../integ.autoscaling.lit.js.snapshot/cdk.out | 2 +- .../integ.json | 2 +- .../manifest.json | 14 +-- .../tree.json | 91 ++++++++++--------- .../aws-lambda/test/integ.autoscaling.lit.ts | 7 ++ .../cli-lib-alpha/THIRD_PARTY_LICENSES | 2 +- 8 files changed, 75 insertions(+), 58 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/aws-lambda-autoscaling.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/aws-lambda-autoscaling.assets.json index 784bf713b5a18..9bdfa8cb83721 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/aws-lambda-autoscaling.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/aws-lambda-autoscaling.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "35.0.0", "files": { - "4e491c14be2b36af5be729715edfad23d2db6e3050125cdd632fce51b0900fb5": { + "9c2179d2e5c42d020f87609a967c82735790da815f911970ac273617d34e0df2": { "source": { "path": "aws-lambda-autoscaling.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4e491c14be2b36af5be729715edfad23d2db6e3050125cdd632fce51b0900fb5.json", + "objectKey": "9c2179d2e5c42d020f87609a967c82735790da815f911970ac273617d34e0df2.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/aws-lambda-autoscaling.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/aws-lambda-autoscaling.template.json index 6ac23d677363c..9759663fcd718 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/aws-lambda-autoscaling.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/aws-lambda-autoscaling.template.json @@ -132,6 +132,15 @@ }, "Schedule": "cron(0 20 * * ? *)", "ScheduledActionName": "ScaleDownAtNight" + }, + { + "EndTime": "2023-12-26T00:00:00Z", + "ScalableTargetAction": { + "MaxCapacity": 20 + }, + "Schedule": "cron(0 20 * * ? *)", + "ScheduledActionName": "WithStartAndEnd", + "StartTime": "2023-12-25T00:00:00Z" } ], "ServiceNamespace": "lambda" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/cdk.out index 2313ab5436501..c5cb2e5de6344 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"35.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/integ.json index b0843222e11fd..949a7fdc52682 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "35.0.0", "testCases": { "integ.autoscaling.lit": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/manifest.json index 20b77f5b33063..41203d676d47b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "35.0.0", "artifacts": { "aws-lambda-autoscaling.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-lambda-autoscaling.template.json", + "terminationProtection": false, "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}/4e491c14be2b36af5be729715edfad23d2db6e3050125cdd632fce51b0900fb5.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9c2179d2e5c42d020f87609a967c82735790da815f911970ac273617d34e0df2.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -86,15 +87,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "MyLambdaCurrentVersionE7A382CC9ef7d0f7e3b3b55a2ac4da5225352f4d": [ - { - "type": "aws:cdk:logicalId", - "data": "MyLambdaCurrentVersionE7A382CC9ef7d0f7e3b3b55a2ac4da5225352f4d", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "aws-lambda-autoscaling" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/tree.json index cec884fba04b0..9149ccbdec191 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.js.snapshot/tree.json @@ -20,8 +20,8 @@ "id": "ImportServiceRole", "path": "aws-lambda-autoscaling/MyLambda/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -59,14 +59,14 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Resource": { @@ -89,8 +89,8 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CurrentVersion": { @@ -109,20 +109,20 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnVersion", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Version", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Alias": { @@ -148,16 +148,16 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.CfnAlias", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "ScalingRole": { "id": "ScalingRole", "path": "aws-lambda-autoscaling/Alias/ScalingRole", "constructInfo": { - "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "AliasScaling": { @@ -229,14 +229,23 @@ "scalableTargetAction": { "maxCapacity": 20 } + }, + { + "scheduledActionName": "WithStartAndEnd", + "schedule": "cron(0 20 * * ? *)", + "startTime": "2023-12-25T00:00:00.000Z", + "endTime": "2023-12-26T00:00:00.000Z", + "scalableTargetAction": { + "maxCapacity": 20 + } } ], "serviceNamespace": "lambda" } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_applicationautoscaling.CfnScalableTarget", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Tracking": { @@ -263,62 +272,62 @@ } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_applicationautoscaling.CfnScalingPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_applicationautoscaling.TargetTrackingScalingPolicy", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_applicationautoscaling.ScalableTarget", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_applicationautoscaling.BaseScalableAttribute", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.aws_lambda.Alias", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "FunctionName": { "id": "FunctionName", "path": "aws-lambda-autoscaling/FunctionName", "constructInfo": { - "fqn": "aws-cdk-lib.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-lambda-autoscaling/BootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-lambda-autoscaling/CheckBootstrapVersion", "constructInfo": { - "fqn": "aws-cdk-lib.CfnRule", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } }, "Tree": { @@ -326,13 +335,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.3.0" } } }, "constructInfo": { - "fqn": "aws-cdk-lib.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.3.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.ts index 12482675be521..0f3102061c09a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.autoscaling.lit.ts @@ -42,6 +42,13 @@ class TestStack extends cdk.Stack { maxCapacity: 20, }); + scalingTarget.scaleOnSchedule('WithStartAndEnd', { + schedule: appscaling.Schedule.cron({ hour: '20', minute: '0' }), + startTime: new Date('2023-12-25'), + endTime: new Date('2023-12-26'), + maxCapacity: 20, + }); + new cdk.CfnOutput(this, 'FunctionName', { value: fn.functionName, }); diff --git a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES index ad862cd67eb28..dca24204c0348 100644 --- a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES +++ b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES @@ -3680,4 +3680,4 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------- +---------------- \ No newline at end of file From a891cbde54f0a8b683451115f507b52a162bef8e Mon Sep 17 00:00:00 2001 From: Michael Sambol Date: Tue, 28 Nov 2023 05:34:34 -0800 Subject: [PATCH 4/5] remove file change --- .../framework-integ/test/aws-s3/test/integ.lifecycle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.ts index 2bb95e3e135a7..d77f26f742559 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.lifecycle.ts @@ -23,4 +23,4 @@ new Bucket(stack, 'MyBucket', { new IntegTest(app, 'cdk-integ-lifecycle', { testCases: [stack], -}); +}); \ No newline at end of file From 3ff4bb81c12550a81fd9717eba55eb19ec72dcce Mon Sep 17 00:00:00 2001 From: Michael Sambol Date: Tue, 28 Nov 2023 05:36:14 -0800 Subject: [PATCH 5/5] actually remove file change --- packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES index dca24204c0348..4fc8eaf268c73 100644 --- a/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES +++ b/packages/@aws-cdk/cli-lib-alpha/THIRD_PARTY_LICENSES @@ -207,7 +207,7 @@ The @aws-cdk/cli-lib-alpha package includes the following third-party software/l ---------------- -** @jsii/check-node@1.92.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.92.0 | Apache-2.0 +** @jsii/check-node@1.91.0 - https://www.npmjs.com/package/@jsii/check-node/v/1.91.0 | Apache-2.0 jsii Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -471,7 +471,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE ---------------- -** aws-sdk@2.1498.0 - https://www.npmjs.com/package/aws-sdk/v/2.1498.0 | Apache-2.0 +** aws-sdk@2.1492.0 - https://www.npmjs.com/package/aws-sdk/v/2.1492.0 | Apache-2.0 AWS SDK for JavaScript Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. @@ -668,7 +668,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ---------------- -** cdk-from-cfn@0.69.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.69.0 | MIT OR Apache-2.0 +** cdk-from-cfn@0.67.0 - https://www.npmjs.com/package/cdk-from-cfn/v/0.67.0 | MIT OR Apache-2.0 ---------------- @@ -3680,4 +3680,4 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------- \ No newline at end of file +----------------