SAM Doctor

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

  1. Confirm the submitted runtime. Inspect the function's Runtime in the source template and in .aws-sam/build/template.yaml when SAM generated the deployment artifact.
  2. Choose a currently supported replacement from the AWS Lambda runtimes and deprecation policy.
  3. 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.
  4. Rebuild and test before redeploying. Update Runtime: only after the compatibility review, run the project's tests and sam 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