Lambda "The Runtime Parameter of python3.x Is No Longer Supported": Every Runtime's Deprecation and Block Dates, the Helper Functions Behind Surprise Errors, and How to Upgrade Safely
Lambda's "InvalidParameterValueException: The runtime parameter of python3.7 is no longer supported for creating or updating AWS Lambda functions" means you tried to create or update a function on a runtime that Lambda has retired, and that runtime has passed its block date. The fix is to move the function to a supported runtime, such as python3.13 or nodejs22.x, with one update-function-configuration call, and then test it. Retirement happens in three steps, and the dates surprise people. A runtime is first deprecated: no more security patches, and the console stops offering it. Only later does Lambda block creating functions on it, and later still block updating them. For most recent runtimes, AWS has pushed those blocks far out: Python 3.9 was deprecated on December 15, 2025, yet new Python 3.9 functions can still be created with the CLI until July 29, 2027. Two more things are worth knowing now. Python 3.10 is deprecated on October 31, 2026, and the runtime in the error often isn't your function at all, but a helper function your deployment tool created for you. This page shows where every runtime stands today, how to find every function on an old runtime, including old versions an alias still points to, and the code changes that break during the upgrade.
Ethan, a developer, looks after a handful of Lambda functions for his friend Jake's phone repair shop. One morning, a routine deploy that changed nothing but an environment variable failed with this error, naming a runtime Ethan didn't remember using. It wasn't his invoice function at all. It was a small helper function his deployment tool had quietly created three years earlier, still on a runtime that had since been retired.
New to Lambda? A Lambda function runs your code on a runtime, a ready-made environment for one language version, such as Python 3.13 or Node.js 22. When a language version reaches its end of life, Lambda retires the matching runtime, and functions have to move to a newer one. Our Lambda guide covers the basics.
What the error means: the three stages of a retired runtime
The full message names the runtime that's been retired:
InvalidParameterValueException: The runtime parameter of nodejs14.x is no longer supported for creating or updating AWS Lambda functions.
Lambda retires a runtime in stages, each with its own date, and this error only appears in the later ones:
| Stage | When | What changes |
|---|---|---|
| Notice | At least 180 days before deprecation | An email to the account's primary contact, plus the Health Dashboard and Trusted Advisor |
| Deprecation | The deprecation date | No more security patches or support. The console stops creating or updating functions on it, but the CLI, SAM and CloudFormation still can |
| Block create | At least 30 days after deprecation | New functions on that runtime are refused, with this error |
| Block update | At least 60 days after deprecation | Code and configuration changes to existing functions are refused, with this error. Changing the runtime to a supported one is still allowed |
Three things follow, and they explain most confusion about this error:
- Your function keeps running. Retired runtimes can still be invoked indefinitely, without patches or support, and they can break in other ways over time, such as an expired certificate.
- "Works in the CLI, missing in the console" is normal between the deprecation and block dates.
- There's no going back. Once updates are blocked, you can't switch a function back to the retired runtime, so keep the old version published until the new one is proven.
Jake: "So the old function still works; you just can't touch it anymore?"
Ethan: "Right, and that's the trap. It runs for years, and the day you need to change one setting, you can't."
Where every runtime stands today (October 13, 2026)
For most recent runtimes, AWS has moved the block dates well beyond the usual 30 and 60 days. Here's the picture today, grouped by what you can still do:
| Runtime | Deprecated | Create blocked | Update blocked |
|---|---|---|---|
| Supported, deprecation coming soon | |||
| python3.10 | Oct 31, 2026 | Jul 29, 2027 | Aug 31, 2027 |
| dotnet8 | Nov 10, 2026 | Jul 29, 2027 | Aug 31, 2027 |
| ruby3.3 | Mar 31, 2027 | Jul 29, 2027 | Aug 31, 2027 |
| nodejs22.x | Apr 30, 2027 | Jun 1, 2027 | Jul 1, 2027 |
| python3.11, java11, java17 | Jun 30, 2027 | Jul 29, 2027 | Aug 31, 2027 |
| Deprecated, but you can still create and update with the CLI, SAM or CloudFormation | |||
| provided.al2 | Jul 31, 2026 | Jul 29, 2027 | Aug 31, 2027 |
| nodejs20.x | Apr 30, 2026 | Jul 29, 2027 | Aug 31, 2027 |
| ruby3.2 | Mar 31, 2026 | Jul 29, 2027 | Aug 31, 2027 |
| python3.9 | Dec 15, 2025 | Jul 29, 2027 | Aug 31, 2027 |
| nodejs18.x | Sep 1, 2025 | Jul 29, 2027 | Aug 31, 2027 |
| dotnet6, python3.8, nodejs16.x | 2024 | Jul 29, 2027 | Aug 31, 2027 |
| New functions blocked; existing ones can still be updated | |||
| python3.7, nodejs14.x, ruby2.7 | Dec 2023 | Jan 9, 2024 | Aug 31, 2027 |
| java8, go1.x, provided | Jan 8, 2024 | Feb 8, 2024 | Aug 31, 2027 |
| Fully blocked: create and update both refused | |||
| dotnetcore3.1 | Apr 3, 2023 | Apr 3, 2023 | May 3, 2023 |
| nodejs12.x | Mar 31, 2023 | Mar 31, 2023 | Apr 30, 2023 |
| python3.6 | Jul 18, 2022 | Jul 18, 2022 | Aug 29, 2022 |
| nodejs10.x, ruby2.5, python2.7 and older | 2021 and earlier | 2021 and earlier | 2022 and earlier |
So today, the error shows up in two situations: creating a function on Python 3.7, Node.js 14, Ruby 2.7, Java 8, Go 1.x or anything older, and updating a function still on Python 3.6, Node.js 12, .NET Core 3.1 or older. Everything else on the deprecated list still accepts changes until 2027, with no patches in the meantime. The list keeps moving, so check the runtime table in the Lambda documentation for your runtime before planning around a date.
Find every function on an old runtime
The notice email lists only the $LATEST version of each affected function, and only for one account. Search yourself. This lists functions on runtimes that are deprecated or close to it:
aws lambda list-functions --query "Functions[?contains(['python3.9','python3.10','nodejs18.x','nodejs20.x'], Runtime)].[FunctionName,Runtime]" --output text
invoice-mailer python3.9
stock-sync nodejs18.x
old-report python3.10
Lambda functions belong to a Region, and that command only looks in your default one. To check every Region in the account:
for r in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do
aws lambda list-functions --region "$r" --query "Functions[].[FunctionName,Runtime]" --output text | sed "s/^/$r /"
done
Don't forget published versions
A published version keeps the runtime it was published with. If an alias such as prod points at version 1, upgrading $LATEST doesn't upgrade what prod runs. Ethan upgraded stock-sync to Node.js 22, and the normal listing showed nothing left on Node.js 18. Adding --function-version ALL showed the version that was still live:
aws lambda list-functions --function-version ALL --query "Functions[?Runtime=='nodejs18.x'].[FunctionName,Version,Runtime]" --output text
stock-sync 1 nodejs18.x
Publish a new version from the upgraded $LATEST, then move the alias to it. AWS Trusted Advisor's deprecated runtimes check also lists affected versions across the account.
When the function isn't yours: tool-made helper functions
If the error names a runtime you never chose, the function was probably created by a tool on your behalf. It's a common source of this error: a deploy that changes nothing about your own code fails because the tool also updates its helper.
- AWS CDK creates small Lambda functions behind custom resources and some constructs. Newer
aws-cdk-libversions use newer runtimes for these helpers, so upgrade it and deploy again. - Serverless Framework and its plugins can add their own functions. Upgrade the framework and plugins, or set the runtime where the plugin allows it.
- Amplify, Control Tower and other managed setups deploy their own functions. Update the tool or the landing zone to its current version.
- Old CloudFormation or SAM templates copied from a tutorial often hard-code an old
Runtime. Search your templates for it.
The function name in the stack's events, or in list-functions, usually gives the tool away: names containing the stack name plus words like CustomResource, Provider or LogRetention are typical of generated helpers.
Jake: "So a function you didn't write can stop you from changing one you did?"
Ethan: "In the same deployment, yes. The tool updates everything it owns, and it owned an old one."
Upgrade a function safely
The upgrade itself is one setting. With the AWS CLI:
aws lambda update-function-configuration --function-name invoice-mailer --runtime python3.13
In a CloudFormation or SAM template, change the Runtime property and deploy; in Terraform, change runtime on the aws_lambda_function. A safe order:
- Publish a version of the current function, so you have a way back while you test.
- Rebuild your package for the new runtime: dependencies with compiled code must be built for the new Python or Node.js version and the new Amazon Linux.
- Change the runtime on
$LATESTand run your tests against it. - Publish a new version and point your alias at it.
- Watch errors for a day, then remove the old version once you're sure.
Step 2 matters most when you cross operating systems. Python 3.11 and older, and Node.js 18, run on Amazon Linux 2; Python 3.12 and later and Node.js 20 and later run on Amazon Linux 2023. Packages with compiled code built for one can fail on the other, which our glibc guide explains.
What breaks in the upgrade, and the fixes
Python 3.12 and later: distutils is gone
Python 3.12 removed the distutils module. Code that imported it, often for version comparisons, works on Python 3.9 and fails on Python 3.13 before your handler runs:
from distutils.version import LooseVersion
def lambda_handler(event, context):
return {"newer": LooseVersion("3.13") > LooseVersion("3.9")}
{"errorMessage": "Unable to import module 'lambda_function': No module named 'distutils'", "errorType": "Runtime.ImportModuleError"}
The usual replacement is the packaging library, which you include in your deployment package like any other dependency:
from packaging.version import Version
def lambda_handler(event, context):
return {"newer": Version("3.13") > Version("3.9")}
Node.js 18 and later: no aws-sdk v2
Node.js 18 and later runtimes include version 3 of the AWS SDK for JavaScript, not version 2. A function written for the old SDK, with require("aws-sdk") and no copy of the SDK in its package, fails on the new runtime:
{"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'aws-sdk'"}
Move the calls to SDK v3, whose client packages the runtime already includes:
import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3";
const s3 = new S3Client({});
export const handler = async () => {
const { Buckets } = await s3.send(new ListBucketsCommand({}));
return { buckets: Buckets.map((b) => b.Name) };
};
Saved as index.mjs, this runs on Node.js 22 with nothing extra in the package. If you switch to .mjs and ES module imports at the same time, our ES module guide covers the require errors that come with it.
Go 1.x: move to the OS-only runtime
There's no newer go runtime; Go functions now run on the OS-only runtime, provided.al2023. For a .zip package, build your Go program for Linux and name the executable bootstrap, at the root of the zip, then set the runtime to provided.al2023.
Can you stay on a deprecated runtime?
For a while, technically, yes: the function keeps running, and on most deprecated runtimes you can keep deploying with the CLI, SAM or CloudFormation until mid-2027. But it gets no security patches, AWS support won't help with it, and on the block-update date it freezes: no more configuration changes, not even a new environment variable, until you move it to a supported runtime. Plan the upgrade for a quiet week rather than the day a deploy fails.
Moving the function into a container image doesn't escape this either. With an image, there are no deprecation emails at all, and once the language version is retired, keeping the base image patched becomes your job alone.
Never be surprised again: check runtimes before you deploy
A deprecated runtime is easy to catch before it reaches AWS. This script searches your templates and Terraform files for retired runtimes and stops the build if it finds one:
#!/bin/bash
# Fail the build if any template or Terraform file uses a deprecated Lambda runtime
OLD='python2\.7|python3\.(6|7|8|9)\b|nodejs(8\.10|10|12|14|16|18|20)\.x|ruby2\.(5|7)|ruby3\.2|java8\b|go1\.x|dotnet(core[0-9.]+|6)\b|provided\.al2\b'
if grep -rnE "$OLD" --include='*.yaml' --include='*.yml' --include='*.json' --include='*.tf' "${1:-.}"; then
echo "Deprecated Lambda runtime found. Upgrade before deploying."
exit 1
fi
echo "No deprecated Lambda runtimes found."
Run it as bash check-runtimes.sh infra, where infra is the folder with your templates. On a folder with a Python 3.9 SAM function and a Node.js 18 Terraform function, it names both and fails:
bad/main.tf:2: runtime = "nodejs18.x"
bad/template.yaml:5: Runtime: python3.9
Deprecated Lambda runtime found. Upgrade before deploying.
To make it part of your routine:
- Add the script to your repository and run it as the first step of every pipeline.
- Add each runtime to the pattern on its deprecation date, starting with
python3.10on October 31, 2026 anddotnet8on November 10, 2026. - Run the all-Regions
list-functionssearch once a quarter, for functions created outside your templates. - Make sure the account's primary contact email reaches someone who reads it, because that's where the 180-day notice goes.
Jake: "So the build itself tells you before AWS does."
Ethan: "A year before, if you keep the list current. That's a lot better than finding out from a failed deploy."
Troubleshooting by symptom
The error names a runtime I never used
A tool created a helper function on it, such as a CDK custom resource or a framework plugin. Upgrade the tool and redeploy.
The console doesn't offer my runtime, but the CLI works
The runtime is deprecated. The console stops on the deprecation date; the CLI, SAM and CloudFormation work until the block dates.
I upgraded the function, but production still runs the old runtime
Your alias points at an older published version. Publish a new version and update the alias.
After upgrading Python, "No module named 'distutils'"
Python 3.12 removed distutils. Replace it, usually with the packaging library, and include it in your package.
After upgrading Node.js, "Cannot find module 'aws-sdk'"
Node.js 18 and later include only SDK v3. Move to @aws-sdk/client-* packages, or bundle v2 yourself as a stopgap.
Compiled packages fail after the upgrade
The new runtime may run on Amazon Linux 2023. Rebuild dependencies for the new runtime and operating system.
Lambda deprecated runtime: frequently asked questions
What does "the runtime parameter is no longer supported" mean?
The runtime in your create or update request has been retired and has passed its block date. Change the function to a supported runtime, such as python3.13 or nodejs22.x.
Do Lambda functions stop working when the runtime is deprecated?
No. They can be invoked indefinitely, but they get no security patches or support, and they can break over time. After the block-update date, you can't change them without upgrading the runtime.
When is Python 3.10 deprecated in Lambda?
October 31, 2026. Creating new Python 3.10 functions is blocked from July 29, 2027, and updating them from August 31, 2027.
Can I still create Python 3.9 Lambda functions?
Through the CLI, SAM or CloudFormation, yes, until July 29, 2027; the console stopped offering it on December 15, 2025. It gets no security patches, so use python3.13 for new work.
When was Node.js 18 deprecated in Lambda?
September 1, 2025. Creating Node.js 18 functions is blocked from July 29, 2027, and updating them from August 31, 2027.
How do I find Lambda functions using a deprecated runtime?
Run aws lambda list-functions with a query on Runtime in every Region, add --function-version ALL to include published versions, or use the Trusted Advisor deprecated runtimes check.
How do I change a Lambda function's runtime?
Run aws lambda update-function-configuration --function-name NAME --runtime python3.13, or change Runtime in your template and deploy. Rebuild compiled dependencies first.
Can I roll back to a deprecated runtime?
Only until the block-update date. After that, a function can't be switched back, so keep an old published version until the upgrade is proven.
Why does the error mention a function I didn't create?
Deployment tools create helper functions, such as CDK custom resources and framework plugins. Upgrading the tool updates their runtimes.
Why can I create a deprecated runtime in the CLI but not the console?
From the deprecation date, the console blocks the runtime, while the CLI, SAM and CloudFormation keep working until the block-create date.
How will AWS tell me a runtime is being deprecated?
At least 180 days ahead, by email to the account's primary contact, in the Health Dashboard, and in Trusted Advisor's deprecated runtimes check.
What replaced the Go 1.x Lambda runtime?
The OS-only runtime, provided.al2023. Build a Linux executable named bootstrap, put it at the root of the zip, and set that runtime.
Does upgrading the runtime update my published versions?
No. Published versions keep their runtime. Publish a new version from the upgraded $LATEST and move your aliases to it.
Why does my Python code fail after upgrading to Python 3.13?
Common causes are removed modules such as distutils, and compiled packages built for Amazon Linux 2. Replace removed modules and rebuild dependencies for the new runtime.
Is aws-sdk available in the Node.js 22 Lambda runtime?
No. Node.js 18 and later runtimes include the AWS SDK for JavaScript v3 only. Use the @aws-sdk/client-* packages.
Which Lambda runtime should I upgrade to?
The newest one your code and libraries support, so you upgrade less often: python3.13 or python3.14, nodejs22.x or nodejs24.x, java21 or java25.
For readers preparing for an AWS certification
We have been covering AWS certifications alongside our fixes, so here is a short extra for readers studying for one. If you only came for the fix, you already have it; feel free to skip this part.
Exams that test this topic: Developer – Associate (DVA-C03 from December 1, 2026) • CloudOps Engineer – Associate (SOA-C03).
Here are the exam-style questions this topic tends to raise, with the reasoning you need to answer them:
1. What happens when a Lambda runtime is deprecated?
It stops receiving security patches; later you can no longer create functions with it, then no longer update them.
2. Do existing functions stop running at deprecation?
No. They keep running, but without patches.
3. How do you find functions on deprecated runtimes?
Trusted Advisor checks, AWS Health notifications, or listing functions by runtime.
4. How do you upgrade a runtime safely?
Update the code and dependencies, test a new version, then shift an alias gradually.
5. Which option lets you keep a specific runtime version under your control?
Container images, where you manage the base image (and its patching).
6. Where are runtime deprecation dates announced?
In the Lambda runtimes documentation and AWS Health Dashboard.
Exam codes and dates change often. Our AWS certification changes page keeps track of what is current.
Ethan's fix for the deploy took one command: an upgrade of the deployment tool, which rebuilt its helper function on a current runtime. The real work came after. He ran the list across every Region, found two functions on Python 3.9 and one old version of stock-sync that an alias still pointed to, and upgraded all three in a quiet week, before Python 3.10's date arrived. The invoice function needed one change, a distutils import.
📌 If you keep one line from this page
A retired runtime keeps running but freezes on its block-update date; find every function and version on old runtimes now, upgrade them in a quiet week, and check helper functions your tools created.
Deprecated → console blocks · block create → no new functions · block update → no changes except a newer runtime.
Revision note. Written October 13, 2026, eighteen days before Python 3.10's date. "A stitch in time saves nine," says the old proverb; one runtime upgrade in a quiet week saves a frozen function on a busy one.