QuestionQ33

VerifiedDeployment

A company’s developer needs to activate Amazon CloudWatch Logs Insights for an application’s AWS Lambda functions. The company uses an AWS Serverless Application Model (AWS SAM) template to deploy the application. The SAM template includes a logical resource that is named CloudWatchLogGroup.

How should the developer modify the SAM template to activate CloudWatch Logs Insights for the Lambda functions?

Explanation

To enable CloudWatch Lambda Insights, attach the Lambda Insights extension layer (AWS-managed) and add the CloudWatchLambdaInsightsExecutionRolePolicy to the function's IAM role. This provides enhanced monitoring metrics and insights directly in CloudWatch Logs, distinct from X-Ray tracing which requires a different configuration.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!