Search code examples
amazon-web-servicesamazon-s3aws-lambdaaws-cdk

AWS S3EventSource Lambda Function Runtime


Is there a way to update the lambda function runtime that was created by the S3EventSource using CDK? Otherwise, CLI? Currently, we have it under Python 3.7 and that needs to be upgraded to Python 3.11.

Tried to look for an option to upgrade it to Python 3.11, but it seems that there isn't a way to do that via CDK or CLI.


Solution

  • Updating the CDK version will help to fix the said issue.

    1. Update the aws-cdk version from the package.json file.
    2. Delete the node_modules/ folder in your project directory.
    3. Run the npm install to install the libraries within our package-lock.json file.