Posted On: Jul 27, 2023

AWS Lambda now supports creating serverless applications using Python 3.11. Developers can use Python 3.11 as both a managed runtime and a container base image, and AWS will automatically apply updates to the managed runtime and base image as they become available. You can use Python 3.11 with Lambda@Edge, allowing you to customize low-latency content delivered through Amazon CloudFront. Powertools for AWS Lambda, a developer toolkit to implement serverless best practices and increase developer velocity, also supports Python 3.11. 

Python 3.11 contains major performance enhancements over Python 3.10. With Lambda’s per-millisecond billing model, workloads using Python 3.11 typically run faster and cheaper than with older Python versions. Developers creating serverless applications can take advantage of new Python 3.11 language features, improving efficiency and making code more readable. For more information, see our blog post at Python 3.11 runtime now available in AWS Lambda.

The Python 3.11 runtime is available in all Regions where Lambda is available, except for China and GovCloud Regions.

You can use the full range of AWS deployment tools, including the Lambda console, AWS CLI, AWS Serverless Application Model (AWS SAM), CDK, and AWS CloudFormation to deploy and manage serverless applications written in Python 3.11. To migrate existing Lambda functions running earlier Python versions, review your code for compatibility with Python 3.11 and then update the function runtime, or use the AWS-provided Python 3.11 base image to build and deploy Python 3.11 functions using containers. For more information about AWS Lambda, visit our product page