Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

AWSConfigRemediation-EncryptLambdaEnvironmentVariablesWithCMK - AWS Systems Manager Automation runbook reference

AWSConfigRemediation-EncryptLambdaEnvironmentVariablesWithCMK

Description

The AWSConfigRemediation-EncryptLambdaEnvironmentVariablesWithCMK runbook encrypts, at rest, the environment variables for the AWS Lambda (Lambda) function you specify using an AWS Key Management Service (AWS KMS) customer managed key. This runbook should only be used as a baseline to ensure that your Lambda function's environment variables are encrypted according to minimum recommended security best practices. We recommend encrypting multiple functions with different customer managed keys.

Run this Automation (console)

Document type

Automation

Owner

Amazon

Platforms

Linux, macOS, Windows

Parameters

  • AutomationAssumeRole

    Type: String

    Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf.

  • FunctionName

    Type: String

    Description: (Required) The name or ARN of the Lambda function whose environment variables you want to encrypt.

  • KMSKeyArn

    Type: String

    Description: (Required) The ARN of the AWS KMS customer managed key you want to use to encrypt your Lambda function's environment variables.

Required IAM permissions

The AutomationAssumeRole parameter requires the following actions to use the runbook successfully.

  • ssm:StartAutomationExecution

  • ssm:GetAutomationExecution

  • lambda:GetFunctionConfiguration

  • lambda:UpdateFunctionConfiguration

Document Steps

  • aws:waitForAwsResourceProperty - Waits for the LastUpdateStatus property to be Successful .

  • aws:executeAwsApi - Encrypts the environment variables for the Lambda function you specify in the FunctionName parameter using the AWS KMS customer managed key you specify in the KMSKeyArn parameter.

  • aws:assertAwsResourceProperty - Confirms encryption is enabled on the environment variables for your Lambda function.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.