From 3b791a8abb7519de896f6c5888362a2bf0f64d74 Mon Sep 17 00:00:00 2001 From: Yerzhan Mazhkenov <20302932+yerzhan7@users.noreply.github.com> Date: Fri, 15 Mar 2024 14:32:30 +0000 Subject: [PATCH 1/3] chore(s3): upgrade S3BucketNotifications Lambda to python3.11 --- .../notifications-resource/notifications-resource-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-s3/lib/notifications-resource/notifications-resource-handler.ts b/packages/aws-cdk-lib/aws-s3/lib/notifications-resource/notifications-resource-handler.ts index 9c969b8b06bca..4c4968f1558ec 100644 --- a/packages/aws-cdk-lib/aws-s3/lib/notifications-resource/notifications-resource-handler.ts +++ b/packages/aws-cdk-lib/aws-s3/lib/notifications-resource/notifications-resource-handler.ts @@ -98,7 +98,7 @@ export class NotificationsResourceHandler extends Construct { Code: { ZipFile: handlerSourceWithoutComments }, Handler: 'index.handler', Role: this.role.roleArn, - Runtime: 'python3.9', + Runtime: 'python3.11', Timeout: 300, }, }); From 431ad848a42f2c61a0d3b4423889050b91118252 Mon Sep 17 00:00:00 2001 From: Yerzhan Mazhkenov <20302932+yerzhan7@users.noreply.github.com> Date: Fri, 15 Mar 2024 14:54:41 +0000 Subject: [PATCH 2/3] Update snapshots --- .../integ.s3.imported-bucket.js.snapshot/tester.template.json | 2 +- .../integ.s3.js.snapshot/lambda-event-source-s3.template.json | 2 +- .../test/integ.notifications.js.snapshot/test-3.template.json | 2 +- .../cdk-integ-lambda-bucket-notifications.template.json | 2 +- .../sns-bucket-notifications.template.json | 2 +- .../integ-sqs-bucket-notifications.template.json | 2 +- .../sqs-bucket-notifications.template.json | 2 +- .../aws-cdk-s3-notifications.template.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-event-sources/test/integ.s3.imported-bucket.js.snapshot/tester.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-event-sources/test/integ.s3.imported-bucket.js.snapshot/tester.template.json index 8bad325aed1ad..2319fb188a3ba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-event-sources/test/integ.s3.imported-bucket.js.snapshot/tester.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-event-sources/test/integ.s3.imported-bucket.js.snapshot/tester.template.json @@ -178,7 +178,7 @@ "Arn" ] }, - "Runtime": "python3.9", + "Runtime": "python3.11", "Timeout": 300 }, "DependsOn": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-event-sources/test/integ.s3.js.snapshot/lambda-event-source-s3.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-event-sources/test/integ.s3.js.snapshot/lambda-event-source-s3.template.json index 04ce3c2d9e109..4391dd632d8a2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-event-sources/test/integ.s3.js.snapshot/lambda-event-source-s3.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-event-sources/test/integ.s3.js.snapshot/lambda-event-source-s3.template.json @@ -323,7 +323,7 @@ "Arn" ] }, - "Runtime": "python3.9", + "Runtime": "python3.11", "Timeout": 300 }, "DependsOn": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/integ.notifications.js.snapshot/test-3.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/integ.notifications.js.snapshot/test-3.template.json index fbc82f667ab39..a4c6c1474ee02 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/integ.notifications.js.snapshot/test-3.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/integ.notifications.js.snapshot/test-3.template.json @@ -254,7 +254,7 @@ "Arn" ] }, - "Runtime": "python3.9", + "Runtime": "python3.11", "Timeout": 300 }, "DependsOn": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/lambda/integ.bucket-notifications.js.snapshot/cdk-integ-lambda-bucket-notifications.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/lambda/integ.bucket-notifications.js.snapshot/cdk-integ-lambda-bucket-notifications.template.json index d9c1a51e5e340..940d53e40c205 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/lambda/integ.bucket-notifications.js.snapshot/cdk-integ-lambda-bucket-notifications.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/lambda/integ.bucket-notifications.js.snapshot/cdk-integ-lambda-bucket-notifications.template.json @@ -246,7 +246,7 @@ "Arn" ] }, - "Runtime": "python3.9", + "Runtime": "python3.11", "Timeout": 300 }, "DependsOn": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sns/integ.sns-bucket-notifications.js.snapshot/sns-bucket-notifications.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sns/integ.sns-bucket-notifications.js.snapshot/sns-bucket-notifications.template.json index aa1bbc1e9ff4c..ef290e6ef91de 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sns/integ.sns-bucket-notifications.js.snapshot/sns-bucket-notifications.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sns/integ.sns-bucket-notifications.js.snapshot/sns-bucket-notifications.template.json @@ -204,7 +204,7 @@ "Arn" ] }, - "Runtime": "python3.9", + "Runtime": "python3.11", "Timeout": 300 }, "DependsOn": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sqs/integ.bucket-notifications-unmanaged.js.snapshot/integ-sqs-bucket-notifications.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sqs/integ.bucket-notifications-unmanaged.js.snapshot/integ-sqs-bucket-notifications.template.json index 0a89f897d98c2..4cf9e73a147f6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sqs/integ.bucket-notifications-unmanaged.js.snapshot/integ-sqs-bucket-notifications.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sqs/integ.bucket-notifications-unmanaged.js.snapshot/integ-sqs-bucket-notifications.template.json @@ -412,7 +412,7 @@ "Arn" ] }, - "Runtime": "python3.9", + "Runtime": "python3.11", "Timeout": 300 }, "DependsOn": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sqs/integ.bucket-notifications.js.snapshot/sqs-bucket-notifications.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sqs/integ.bucket-notifications.js.snapshot/sqs-bucket-notifications.template.json index 5054faf3f9eda..27d4054b8d193 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sqs/integ.bucket-notifications.js.snapshot/sqs-bucket-notifications.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-notifications/test/sqs/integ.bucket-notifications.js.snapshot/sqs-bucket-notifications.template.json @@ -193,7 +193,7 @@ "Arn" ] }, - "Runtime": "python3.9", + "Runtime": "python3.11", "Timeout": 300 }, "DependsOn": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket.notifications.js.snapshot/aws-cdk-s3-notifications.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket.notifications.js.snapshot/aws-cdk-s3-notifications.template.json index a8da931afe76f..8a13892087d2d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket.notifications.js.snapshot/aws-cdk-s3-notifications.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket.notifications.js.snapshot/aws-cdk-s3-notifications.template.json @@ -89,7 +89,7 @@ "Arn" ] }, - "Runtime": "python3.9", + "Runtime": "python3.11", "Timeout": 300 }, "DependsOn": [ From d72e1a0e518e295a27272c7387a085642264d9c1 Mon Sep 17 00:00:00 2001 From: Yerzhan Mazhkenov <20302932+yerzhan7@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:14:23 +0000 Subject: [PATCH 3/3] Update unit test in `aws-s3` package --- packages/aws-cdk-lib/aws-s3/test/notification.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-s3/test/notification.test.ts b/packages/aws-cdk-lib/aws-s3/test/notification.test.ts index 225fb4a6991f7..fb5b037d74c1d 100644 --- a/packages/aws-cdk-lib/aws-s3/test/notification.test.ts +++ b/packages/aws-cdk-lib/aws-s3/test/notification.test.ts @@ -182,7 +182,7 @@ describe('notification', () => { }); Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', { - Runtime: 'python3.9', + Runtime: 'python3.11', }); }); });