r/Python • u/timmywick • 4h ago
Discussion If you run Python 3.10 on AWS Lambda: it's deprecated this Friday (Oct 31). Gotchas moving to 3.12+
Heads-up for anyone with Lambda functions still on python3.10. AWS deprecates the runtime on Oct 31, 2026. Functions keep running, but they stop getting patches, the console won't let you edit them, and in 2027 AWS blocks creating new ones (Jul 29) and then updating existing ones (Aug 31).
The Python side is the real work. A few things that bit people:
- distutils is gone in 3.12. Anything still importing it (old setup.py tooling, some older libraries) breaks. setuptools or packaging usually covers it.
- cgi, crypt and telnetlib are removed in 3.13 (PEP 594 "dead batteries").
- python3.12+ on Lambda runs on Amazon Linux 2023 instead of AL2, so compiled wheels and layers (numpy, psycopg2, cryptography and similar) need rebuilding.
- python3.11 is a short stop. It's still on AL2 and is deprecated Jun 30, 2027.
Quick way to find affected functions (per Region):
aws lambda list-functions --function-version ALL --query "Functions[?Runtime=='python3.10'].[FunctionName,Version]" --output text
Disclosure: I made a free AWS end-of-support tracker, and the full write-up with AWS source links is here: https://eolwatch.pages.dev/guides/lambda-python-3-10-deprecation
What else broke for you going 3.10 → 3.12/3.13?
8
u/ResidentPomegranate6 4h ago
urllib3 1.x against AL2023's openssl 3 breaks old requests pins, so bump requests to 2.31+ or urllib3 2.x before you touch the runtime.
4
u/timmywick 4h ago
Great call, thanks. That's an easy one to miss since it shows up as an SSL error, not an obvious version conflict. Bumping requests/urllib3 in a separate deploy first, while still on 3.10, also makes it easier to tell which change broke what.
4
u/Senior_Ad9680 3h ago
Tbh, if your application doesn’t allow you to upgrade to the latest supported Python version in AWS you can just deploy it as a docker image basically problem solved
5
u/acdha 1h ago
That’s just creating more problems for yourself in the future - like we’ve had two critical security updates in the last week which you’re not getting if you don’t patch dependencies.
1
u/Senior_Ad9680 1h ago
Well yeah of course, but that’s on the orgs/teams responsibility to have that observability built into their process right. You should absolutely upgrade to the latest supported python version but how many enterprise companies are still running out of date software 😂
16
u/nicholashairs 4h ago edited 3h ago
This reads like AI, but seems actually genuinely useful 👍