CloudWiki
Rules
Medium

Ensure Lambda environment variables are using customer-managed Customer Master Keys

Security & Compliance
No items found.
Description

AWS Lambda environment variables can contain sensitive information such as passwords, tokens, or private keys. These variables can be encrypted using AWS Key Management Service (KMS) Customer Master Keys (CMKs) to ensure their security. To prevent unauthorized access to this sensitive information, it is recommended to ensure that Lambda environment variables are using customer-managed CMKs.

Remediation

Here are the remediation steps to ensure that Lambda environment variables are using customer-managed CMKs:

  1. Identify the Lambda functions that are using environment variables to store sensitive information.
  2. Create a new customer-managed CMK or use an existing one.
  3. Create an AWS Key Management Service (KMS) grant to allow the Lambda function to use the CMK.
  4. Update the environment variables in the Lambda function to use the customer-managed CMK. This can be done by adding the "KMS key ID" and "Encryption configuration" in the environment variables configuration of the Lambda function.
  5. Test the Lambda function to ensure it is functioning properly with the updated environment variables.

By following these steps, you can ensure that Lambda environment variables are properly secured using a customer-managed CMK.

Enforced Resources
Note: Remediation steps provided by Lightlytics are meant to be suggestions and guidelines only. It is crucial to thoroughly verify and test any remediation steps before applying them to production environments. Each organization's infrastructure and security needs may differ, and blindly applying suggested remediation steps without proper testing could potentially cause unforeseen issues or vulnerabilities. Therefore, it is strongly recommended that you validate and customize any remediation steps to meet your organization's specific requirements and ensure that they align with your security policies and best practices.