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