AWS Lambda adds support for Python 3.10
AWS Lambda now supports Python 3.10 as both a managed runtime and a container base image. Developers creating serverless applications in Lambda with Python 3.10 can take advantage of numerous Python language enhancements to make code more readable and maintainable. These include pattern matching for data structures, parenthesized context managers to simplify managing resources such as file handles or database connections, and better error handling. For more information on Lambda’s support for Python 3.10, see our blog post at [Python 3.10 runtime now available in AWS Lambda](https://aws.amazon.com/blogs/compute/python-3-10-runtime-now-available-in-aws-lambda/). To deploy Lambda functions using Python 3.10, upload the code through the Lambda console and select the Python 3.10 runtime. You can also use the [AWS CLI](https://aws.amazon.com/cli/), [AWS Serverless Application Model (AWS SAM)](https://github.com/awslabs/serverless-application-model) and [AWS CloudFormation](https://aws.amazon.com/cloudformation/) to deploy and manage serverless applications written in Python 3.10\. Additionally, you can also use the [AWS-provided Python 3.10 base image](https://docs.aws.amazon.com/lambda/latest/dg/python-image.html) to build and deploy Python 3.10 functions using a container image. To migrate existing Lambda functions running earlier Node versions, review your code for compatibility with Node.js 18 and then update the function runtime to Python 3.10. AWS will automatically apply updates to the Python 3.10 managed runtime and to the AWS-provided Python 3.10 base image, as they become available. The Python 3.10 runtime is available in all [Regions where Lambda is available](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/), except for China and GovCloud Regions. Visit our [product page](https://aws.amazon.com/lambda/) for more information about AWS Lambda or sign in to the [AWS Lambda console](https://console.aws.amazon.com/lambda/home) to get started.