<  Back to rules search

Lambda function uses latest runtime environment version

lambda

Classification:

compliance

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

Description

Update your Amazon Lambda Function to the latest runtime environment version.

Rationale

As a best practice, Amazon recommends consistently updating your runtime environment to the latest version for security patches, bug fixes, and the latest features.

Remediation

Console

Follow the Configuring functions in the console docs to learn how to update the Lambda runtime that runs your function.

CLI

  1. Run update-function-configuration with your function name and the latest runtime version supported by AWS.

python3.9

update-function-configuration.sh

  aws lambda update-function-configuration
    --function-name YourLambdaFunction
    --runtime "python3.9"
  

nodejs14.x

update-function-configuration.sh

  aws lambda update-function-configuration
    --function-name YourLambdaFunction
    --runtime "nodejs14.x"
  

java11

update-function-configuration.sh

  aws lambda update-function-configuration
    --function-name YourLambdaFunction
    --runtime "java11"
  

go1.x

update-function-configuration.sh

  aws lambda update-function-configuration
    --function-name YourLambdaFunction
    --runtime "go1.x"
  

dotnet6

update-function-configuration.sh

  aws lambda update-function-configuration
    --function-name YourLambdaFunction
    --runtime "dotnet6"
  

ruby2.7

update-function-configuration.sh

  aws lambda update-function-configuration
    --function-name YourLambdaFunction
    --runtime "ruby2.7"
  

provided.al2

update-function-configuration.sh

  aws lambda update-function-configuration
    --function-name YourLambdaFunction
    --runtime "provided.al2"