aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

S3-Deployment-Assets : update python version on BucketDeployment handler

Open aritranagnordcloud opened this issue 5 years ago • 3 comments

General Issue

Based on the description , We can see that Older Python version 3.6 is currently enabled which will be no longer supported soon.

Documentation The custom resource is implemented in Python 3.6 in order to be able to leverage the AWS CLI for "aws s3 sync". The code is under lib/lambda and unit tests are under test/lambda.

This package requires Python 3.6 during build time in order to create the custom resource Lambda bundle and test it. It also relies on a few bash scripts, so might be tricky to build on Windows.

Resolution Need to update the Lambda Python version having more than 3.6

Environment

CDK CLI Version: 1.119.0 Framework Version: 2.0.0rc18 Node.js Version: 16.6.1 OS: macOS Big Sur 11.4 Language (Version): Python 3.8.11

Other information

Lambda is configured with 3.6 version which has reached the EOF and will not longer be supported soon

aritranagnordcloud avatar Sep 27 '21 09:09 aritranagnordcloud

Hi @aritranagnordcloud the issue is located here: https://github.com/aws/aws-cdk/blob/c165138fa7c3456e530ffeab9b7a038914cc2dca/packages/%40aws-cdk/aws-s3-deployment/lib/bucket-deployment.ts#L281

Changing this to a runtime: lambda.Runtime.PYTHON_3_9, in code should work.

LukvonStrom avatar Sep 27 '21 16:09 LukvonStrom

Converted this into a feature request. Once @otaviomacedo confirms what version we want to change it to (if we want to change it) I can create a PR for this

peterwoodworth avatar Sep 27 '21 22:09 peterwoodworth

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Oct 07 '21 07:10 github-actions[bot]