All checks
Medium Lambda · regional

Lambda functions should use supported runtimes

Checks that the Lambda function uses a supported runtime. When a runtime's components stop receiving security updates, Lambda deprecates it: a function on a deprecated runtime keeps processing events but no longer gets those patches.

service
Lambda
severity
Medium
scope
evaluated in every region

How to fix it

  • Can break clients: Code written for the old runtime can fail on the new one, so test the function on the new runtime before production traffic reaches it.

In the console

Lambda → Functions → the function → Code → Runtime settings

Runtime
A runtime from the Supported runtimes table of the Lambda runtimes page, for the function's language
Aliases
Publish a new version and point each alias at it; published versions keep the old runtime

With the AWS CLI

aws lambda update-function-configuration --function-name <function-name> --runtime <supported-runtime> --region <region>

With Terraform

resource "aws_lambda_function" "this" {
  function_name = var.function_name
  role          = var.execution_role_arn
  filename      = var.deployment_package
  runtime       = var.supported_runtime
}

See which of your accounts this check is failing on.

Book a live scan