
Answer-first summary for fast verification
Answer: Create an IAM instance profile with CloudWatch permissions; add it to the EC2 instance.
CloudWatch agent uses IAM role/credentials to publish custom metrics like memory. If no IAM instance profile with cloudwatch:PutMetricData etc., metrics not published, alarm insufficient. Detailed monitoring is for standard EC2 metrics. Agent config uses role preferably over keys.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A CloudWatch alarm for mem_used_percent from an EC2 instance is stuck in INSUFFICIENT_DATA state. The CloudWatch agent is installed and running, but the metric is not available in CloudWatch. How should this be resolved?
A
Enable CloudWatch detailed monitoring for the EC2 instance.
B
Create an IAM instance profile with CloudWatch permissions; add it to the EC2 instance.
C
Migrate the EC2 instance to a private subnet.
D
Create an IAM user with an access key; update the CloudWatch agent configuration to use those credentials.
No comments yet.