Control: 4.2 Ensure Cloudwatch Lambda insights is enabled
Description
Ensure that Amazon CloudWatch Lambda Insights is enabled for your Amazon Lambda functions for enhanced monitoring.
Amazon CloudWatch Lambda Insights allows you to monitor, troubleshoot, and optimize your Lambda functions. The service collects system-level metrics and summarizes diagnostic information to help you identify issues with your Lambda functions and resolve them as soon as possible. CloudWatch Lambda Insights collects system-level metrics and emits a single performance log event for every invocation of that Lambda function.
Remediation
From the Console:
- Login to AWS Console using https://console.aws.amazon.com/lambda/.
- Click
Functions
. - Click on the name of the function.
- Click on the
Configuration tab
. - Click on 'Monitoring and operations tools'.
- In the Monitoring and operations tools section click
Edit
to update the monitoring configuration. - In the CloudWatch Lambda Insights section click the
Enhanced monitoring
button to enable. Note - When you enable the feature using the AWS Management Console, Amazon Lambda adds the required permissions to your function's execution role. - Click Save.
- Repeat steps 2-8 for each Lambda function within the current region that fails the Audit.
- Then repeat the Audit process for all other regions.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.cis_compute_service_v100_4_2
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.cis_compute_service_v100_4_2 --share
SQL
This control uses a named query:
lambda_function_cloudwatch_insights_enabled