2 Answers
0
Given that the function runs correctly under Python 3.7 but doesn't when you change the runtime I suspect that there are some components in the ZIP which are not compatible with Python 3.9. Rebuild the entire ZIP from scratch using Python 3.9 on your source machine and then upload the new ZIP to Lambda.
I did build the package using python 3.9.
What platform did you build it on?
I built it on an ec2 instance running ubuntu (x86)
0
Convert you lambda in SAM template. and test it on you system. SAM local invoke <Lambda_NAM> --events <EVENT FILE>
answered 21 days ago
Relevant questions
Handler error python lambda function
asked 5 months agoPassing parameters to the Glue Workflow using Python
Accepted Answerasked 2 months agoHow to read DynamoDB table using aws lambda function in python?
asked 4 months agochange lambda to no longer use zip deployment package
asked 2 months agoHow to update Lambda Python 3.6 to 3.9
Accepted Answerasked 3 months agoUsing python-magic in a lambda
asked 22 days agoHow to add python libraries to lambda using the CDK?
Accepted Answerasked 2 years agoPipeline to deploy a Python Lambda using serverless
Accepted Answerasked 3 months agoUnable to run a Python script using BashOperator
Accepted Answerasked a year agoFind the Lambda endpoints using Python Boto3 SDK
asked 6 months ago
Better convert you lambda code in SAM. and test it on local with both runtime.
you might need to add dependency in requriements.txt