Posted On: Aug 16, 2021
AWS Lambda now supports Python 3.9 as both a managed runtime and a container base image. You can now author AWS Lambda functions in Python 3.9 and use its new features, such as support for TLS 1.3, new string and dictionary operations, and improved time zone support. Python 3.9 also includes performance optimizations that you can benefit from without making any code changes. For more information on Lambda’s support for Python 3.9, see our blog post at Python 3.9 runtime now available in AWS Lambda.
To deploy Lambda functions using Python 3.9, upload the code through the Lambda console and select the Python 3.9 runtime. You can also use the AWS CLI, AWS Serverless Application Model (AWS SAM) and AWS CloudFormation to deploy and manage serverless applications written in Python 3.9. Additionally, you can also use the AWS-provided Python 3.9 base image to build and deploy Python 3.9 functions using a container image. To migrate existing Lambda functions running earlier Python versions, update your code to be compatible with Python 3.9 and then update the function runtime to Python 3.9.
Python 3.9 is the latest release of Python and will be supported for security and bug fixes until October 2025. Lambda will automatically apply updates to the Python 3.9 managed runtime and to the Python 3.9 AWS-provided base image, as they become available from the Python community.
The Python 3.9 runtime is available in all Regions where Lambda is available, except for China Regions. Visit our product page for more information about AWS Lambda or sign in to the AWS Lambda console to get started.