ERROR REFERENCE
The Lambda runtime is no longer supported
AWS Lambda rejected a function create or update because the template declares a retired runtime. Retrying the same deployment cannot change that result; the function needs a supported runtime.
WHAT IT MEANS
What this error means
Lambda runtimes move through a deprecation lifecycle. At this stage, Lambda no longer accepts create or update operations for the runtime named in the error. An existing function may still invoke for a limited period, but that does not make the old runtime deployable. This is different from a local SAM build that cannot find the interpreter named by an otherwise supported runtime.
FIX
How to fix it
-
Confirm the submitted runtime. Inspect the
function's
Runtimein the source template and in.aws-sam/build/template.yamlwhen SAM generated the deployment artifact. - Choose a currently supported replacement from the AWS Lambda runtimes and deprecation policy.
- Review compatibility before changing the template. Check language changes, dependencies, native wheels, layers, and the build image or local interpreter required by the new runtime.
-
Rebuild and test before redeploying. Update
Runtime:only after the compatibility review, run the project's tests andsam build, then inspect the generated template again.
AUTOMATE THE TRIAGE
Diagnose this automatically
SAM Doctor recognizes the exact Lambda create/update rejection at high confidence and keeps unrelated CloudFormation failures visible. Runs locally; no AWS access and no log upload.
python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown
RELATED
Related errors
- Binary validation failed for python — the configured runtime is supported, but its interpreter is missing from the build environment.
- CREATE_FAILED / UPDATE_FAILED — the generic CloudFormation resource-failure handoff.