-
Notifications
You must be signed in to change notification settings - Fork 111
Add support for Python 3.11 #62
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
Comments
Thank you for creating this ticket. We are currently working on Python 3.10 support, with Python 3.11 to follow later. We are also working to improve our runtime release process to enable us to release new runtimes more quickly. |
They still don't have Python 3.10 ready and it's been over a year since its release. You might be waiting a LONG time |
Maybe start with an alpha version like 3.12.0a2 then it would take less time to add a new stable version when it releases. |
Open another issue, this is for 3.11 only. What does 3.12 have to do with it here? Thanks |
It's possible to run 3.11 with a custom runtime, for example: |
True, but a custom runtime isn't an official one, hence will always present a security threat potential. Unless you import it, redo it yourself, and many companies won't really consider it worth the work compared to the gains of the update. |
To clarify, I believe @baotran2207 's comment above reflects a desire for when s/he would like AWS Lambda to support Python 3.11. It is not a statement from AWS on when Python 3.11 will be supported. We are currently working on Py3.10 support (see #31). Py3.11 will ship separately. We don't currently have a timeline to share on Py3.11 support. We will we post updates on this issue when we have further information to share. |
Given that 3.11 is so much faster (10–60%), I'm curious what would be the take of aws managment on prioritizing this runtime, considering that the faster execution time will directly translate into smaller lambda bills. Of course, the rational thing to do as customers here is to re-calculate the cost of alternative compute systems and perhaps use lambda less. |
now you have the answer :) they need larger bills, not smaller. So for 3.11 they need to port all the slowdowns back 🤭 |
Amazon Linux 2023 is now GA, and contains Python 3.11 packages as an option (system python in AL2023 will remain as 3.9, but 3.11 is fully functional with pip) |
Should we expect this to roll out as a lambda runtime option soon? I don't see it in the list of options currently |
So let's see the history a bit:
|
Making use of Amazon Linux 2023 I was able to deploy python 3.11 AWS Lambda via the following Dockerfile:
|
Blink twice if you're forced to post these generic updates. More seriously though, if custom runtimes don't have free init, AWS management is probably milking 3.9 as long as possible and focusing on making the containers "easy to use" and "justified". Financially, AWS Lambda likely has to determine if the addition of python 3.10 and 3.11 as managed runtimes will bring in enough new big clients to offset the losses due to existing clients having to pay less from faster lambdas across the board. While this is obviously just speculation on my end, it doesn't sound too far fetched to believe that making people's lambdas significantly faster isn't their primary interest as long as they have decent client retention. Google supports 3.11 since early january this year. Sorry to those subscribed to this (and the 3.10) issue; I'm of the opinion that publicly sharing justified displeasure towards a major player in the cloud providers sphere is a good thing. Their inability to provide any information whatsoever regarding the issues faced during this overly stretched integration of python runtimes is simply insulting. I still remain hopeful that their "improved release process" is a major improvement and not just a case of empty PR talk, but personally I'll move on to another provider in the meantime. |
Still waiting. Surely this can't be this complicated with so many talented engineers on hand. |
There is another way to look at the situation. Making executions faster gives customers more room in their 15 minutes (for compute loads) or expands the capacity of the existing pile of infrastructure. Happier customers or less hardware deploy pressure respectively. As an organization, we've already written all the code necessary to resume long running (15m+) processes, so we're not worried about that aspect. The quicker execution allows us to provide better service to our customers. |
My management often asks for reasons to use one cloud provider over another for different tasks. With the amount of Lambda time we purchase, this kind of stuff makes a good argument to move. AWS needs to stay current with their runtimes. I can make a custom one fairly easily, but that seems like something they should just support. Interesting that in the link that @mat100payette references for GCP, they even list 3.11 as the recommended runtime. Being two versions behind GCP is not a good look, especially since AWS has historically been known to be a leading edge cloud provider. AWS, you should pay attention to this thread. |
@mbtx2 they're now only one version behind GCP - #31 (comment). With 3.10 out the door, that should free up some team members to work on 3.11 support. |
https://aws.amazon.com/blogs/compute/python-3-10-runtime-now-available-in-aws-lambda/ Preview base image released for 3.11. ! |
We have shipped a preview base container image for Python 3.11 support in AWS Lambda. The purpose of this image is to enable customers to get an early look at Python 3.11 support and provide any feedback. This image is subject to change and should not be used for production workloads. At this time, we do not have a schedule to share on when Python 3.11 support will reach General Availability. However, we hear your feedback and acknowledge that the recent delays in supporting the latest runtimes has fallen short of customer expectations. We’re working hard to catch up. |
Thank you, glad to see some progress! We'll start testing that preview image right away. I should add that one thing that would help is some sort of ballpark GA target. I understand your hesitancy in providing any timelines, but the reality is that your customers need to plan, and plans need some sort of expectation of timeline, so it would be very appreciated. Is this git repo the best channel for us to provide feedback on the 3.11 preview? Just submit issues/suggestions here? |
What is the difference between: public.ecr.aws/lambda/python:3.11-preview.2023.04.17.20-x86_64 and public.ecr.aws/lambda/python:3.11-preview? |
@mbtx2 As both tags have the same id/hash, I assume |
Got it, thank you. |
@mbtx2 We will share a timeline for Python 3.11 as soon as we can. You can provide feedback in this thread, or for specific topics it would be better to create a separate issue so we don't mix conversations and can track more clearly. |
I should say that SAM works well with lambda containers built with 3.11 and Lambda RIC. Just doesn't work with the runtime. |
@jtuliani I noticed that the version of boto3 that ships with the runtime hasn't changed since 3.7 (including up to 3.10). source: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html Is that something that could be modernized with 3.11? |
@mt-ronkorving The version of boto3 will keep updated in the runtime updates (in all the supported runtimes), the version |
@jtuliani - Thanks for your attention to this. It would be helpful to have a transparent release schedule from the Lambda team, similar to what the Python Software Foundation provides for python releases. Python releases PEPs which outline the anticipated release schedule for minor and fixpack versions: https://peps.python.org/pep-0693/. Here is a a chart showing previous releases: https://devguide.python.org/versions/ Python 3.12 is expected to be generally available on Oct 02, 2023 (i.e., about 5 months from now). It looks like they've consistently been releasing one minor release every fall from 3.8. Is this something the AWS team can adequately resource to ensure that lambda images are reliably only a few months behind? Will the 3.11 lambda image be released before 3.12 is generally available? Python has been aggressively adding non-trivial functionality in each minor release (e.g., async support, better type hints). If we're going to go through the trouble of rolling our own docker images and testing them, Lambda ceases to be as compelling an option and I'd likely shift our team to Google Cloud Functions (which has been on 3.11 since February) or Fargate. |
will p3.11 get to the arm supported runtimes ? |
@frichtarik That's an oversight in the docs. All runtimes based on AL2 support both ARM and x86_64. I will get the docs updated, thank you for flagging. @abmohan Thank you for your feedback. We recognize there is strong customer demand for timely runtime releases. We're working hard to catch up. |
I still think it's appropriate for AWS to provide some expectation on timeline for 3.11 release for base image and 3.11 managed runtime. Your customers need to plan. If you wait too long, we'll plan on moving to another provider. Open-ended timelines work well for AWS and poorly for your customers. It is clear that AWS is putting more resources on this project, but there is still no clear timeline. Even if it's one that is heavily sandbagged, it's better than "we cannot provide a timeline at this time". |
Are there any expectations for this? The new code build runtime with AL2023 is already available with python 3.11: |
We are actively working on Python 3.11 support. We're not yet ready to share the container image or ETA, but we will do as soon as we can. As with Python 3.10, we recognize that we've fallen behind on runtime support and are working hard to catch up. |
@jtuliani While it is understandable why you wouldn't want to make any promises on when it will be available, can't you at least make a rough statement on when it will not be available? I get that making such a statement could be detrimental if for example you say "at least 3 more months minimum probably" and you lose customers but then deliver it earlier than that. However at this point I honestly feel like it would be the bare minimum of transparency from AWS to tell us how long we should expect to be waiting. There is no way you guys don't have a rough planning of the milestones for 3.11, especially given that you just completed 3.10 and know what most of the challenges were. I appreciate that you at the very least post here, but really there is no substance to most of these posts aside from saying sorry (which is good, but imho not enough for such a cloud leader). Thanks for the hard work. |
I assure you that AWS is not losing customers over release delays of Lambda runtimes(maybe there is some hobby dev somewhere who uses the free tier that is an exception to this), or from a comment in a Github issue. They are going to give us the information they can, but AWS is a massive company with protocols about these things. AWS did a poor job with 3.10 runtime support, and honestly 3.11 should already be available, but it is what it is and they have acknowledged the problem. As a community and customer base, let's please not make this issue into a repeat of the 3.10 issue. There is nothing we are going to do to move the understaffed behemoth that is AWS. |
@BTripp1986 With all due respect, if your preferred solution is to wait silently, that's fine. That being said, please don't tell people not to be vocal about unexplained delays and a blatant lack of transparency from AWS. Sure, there is no point in repeating the same question over and over again, but sadly this is literally the only two-way communication channel we seem to have with AWS Lambda regarding this problematic. People have businesses and jobs, and while the move to 3.11 might not be important to you, it certainly can be for others. Not having the slightest idea of how long we have to wait is quite infuriating, and imo isn't justified by any lack of staff. Not being able to say "it will be ready by X" is fine; they've got lots to do and probably unknowns to deal with. Not being able to say "it most likely won't be ready before X" is another thing... if they have any sort of decent planning, regardless of the unknowns, they should be able to know if 10 weeks or 10 months will be the strict minimum time for completion. If the notifications from this issue bother you or anyone, I would recommend unsubcribing and maybe monitoring the What's New section of AWS (or their rss feed) instead. |
I have to admit, I really like the idea of stating that we should not expect a solution until X amount of time into the future and to come back then regarding a status update. That achieves two benefits:
If AWS allows for it in its policies, it would be useful to share this information as we all know plans are always wrong but if we all admit that and keep on reiterating on them, it still allows us to get a shared picture of what to expect. With constant reiteration we will always get slightly closer to the truth and right now we are being provided with no plans. I can also imagine a case where AWS does not allow these plans to be shared as they could be used as an incentive for competitors to beat AWS to certain features but in this case I think there is no concern over that, a decent amount of competitor serverless solutions support Python 3.11 out of the box already. |
Any updates so far? It's been a month :( |
how is it going with this? |
We have published an updated Lambda container base image for Python 3.11, for both x86_64 and arm64 architectures. This image is suitable for production workloads. Instructions for how to use Lambda container base images for Python are given in the ‘Usage’ tab at https://gallery.ecr.aws/lambda/python. This release also addresses the issue described in #8. We expect to publish managed runtime support for Python 3.11 within 60 days. |
We have completed the launch of Python 3.11 managed runtime support in AWS Lambda: https://aws.amazon.com/blogs/compute/python-3-11-runtime-now-available-in-aws-lambda/ Thanks all for your feedback and patience. |
Is there a timeline for this image to be available in govcloud? |
On Sep 12, 2023, at 4:04 AM, frichtarik ***@***.***> wrote:
bit offtopic but related - will 3.11 get into amazon-linux-extras ? thx
It is available on Amazon Linux 2023, we have no plans to add it to AL2.
|
Latest official update [2023-01-09]:
And another official update from a different thread [2023-02-28]:
Python 3.11
will bewas released on 2022-10-24 (the final release candidate was released on 2022-09-12)(I know that 3.10 isn't available yet on Lambda; but AWS could add both at the same time and not let us wait for > 1 year until they add 3.11 🙏)
The text was updated successfully, but these errors were encountered: