Skip to content

Add support for Python 3.12 #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
michael-k opened this issue Aug 8, 2023 · 12 comments
Closed

Add support for Python 3.12 #110

michael-k opened this issue Aug 8, 2023 · 12 comments

Comments

@michael-k
Copy link

michael-k commented Aug 8, 2023

Latest official update [2023-10-25]:

We are aiming to provide GA support for Python 3.12 in Lambda, as both a base container image and a managed runtime, by the end of 2023.


Python 3.12 was released on 2023-10-02.

@harvey251
Copy link

I wonder how this is going, any timelines

@mdgm88
Copy link

mdgm88 commented Oct 16, 2023

This looks relevant: #92 (comment)

@jtuliani
Copy link
Contributor

Today, we have published a preview AWS Lambda base container image for Python 3.12. You can use this image to build and deploy Python 3.12 Lambda functions if using container images as your function deployment format.

This image is tagged ‘preview’ and should not be used for production workloads. We invite you to provide your feedback on this preview image below. We are aiming to provide GA support for Python 3.12 in Lambda, as both a base container image and a managed runtime, by the end of 2023.

The Python 3.12 preview image is based on the provided.al2023 preview image. Note the use of microdnf as the package manager when updating your Dockerfiles to use this preview.

@fitz-res
Copy link

That's awesome, thanks @jtuliani! Sounds like the team has done a great job improving the release process.

@tlu-rs
Copy link

tlu-rs commented Nov 16, 2023

Thank you @jtuliani for getting these back on track with much shorter lead times after LTS release as I now see nodejs20.x, python3.12 and Java 21 supported in aws-sdk-go. The latter two, python3.12 and Java 21, are not yet visible in the AWS Console but with this support should be any day.

@jtuliani
Copy link
Contributor

Thank you @tlu-rs and @fitz-res. We have been investing in getting new runtimes out promptly once they reach LTS. However, please don't infer too much about the runtime release date from having the runtime identifier surface in the AWS CLI, SDK, or CDK. We are still several weeks away from Python 3.12 GA. Our target is to release before the end of the year.

@MartinXPN
Copy link

@jtuliani I was trying to upgrade my Dockerfiles to use the latest Python 3.12 base image but faced an issue when trying to install gcc-c++ and clang-tidy.

I had the following setup which used to work fine:

FROM public.ecr.aws/lambda/python:3.11

# Initial setup
RUN yum install -y gcc-c++ epel-release centos-release-scl clang-tools-extra

RUN pip install --upgrade pip
RUN pip install awslambdaric -t "${LAMBDA_TASK_ROOT}"
...

I've changed the first line to FROM public.ecr.aws/lambda/python:3.12 and now the build fails on the yum install step with Error: The command '/bin/sh -c yum install -y ...' returned a non-zero code: 127.

Is there something that I'm missing with this new version? Should I change the installation step?

@mdgm88
Copy link

mdgm88 commented Nov 27, 2023

@MartinXPN see https://aws.amazon.com/blogs/compute/introducing-the-amazon-linux-2023-runtime-for-aws-lambda/

The 3.12 image is based on the provided.al2023 image, not the provided.al2 image used for older python runtimes.

@mdgm88
Copy link

mdgm88 commented Dec 14, 2023

Looks like this has been released. I can see 3.12 as an available runtime in the AWS Management Console, and it is now listed as a supported runtime in the documentation: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

@mdgm88
Copy link

mdgm88 commented Dec 15, 2023

There is a post about it on the compute blog: https://aws.amazon.com/blogs/compute/python-3-12-runtime-now-available-in-aws-lambda/

@jtuliani
Copy link
Contributor

We completed the GA launch of Python 3.12 support in Lambda yesterday. Thanks all who noticed already. Please do share any feedback.

https://aws.amazon.com/about-aws/whats-new/2023/12/aws-lambda-support-python-3-12/

@PierreKiwi
Copy link

Hello,
Thanks for Python 3.12 support.

Is it still valid ?
Or is the new target arch manylinux_2_28_aarch64 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants