AWS AWS Monitoring & Operations 4 — Questions and Answers
Question 1: Which CloudWatch feature allows you to create a graph of a metric expression combining multiple metrics with math operations?
- Metric Insights
- Metric Math (Correct answer)
- Composite Alarms
- Contributor Insights
Correct answer: Metric Math
Metric Math lets you query multiple CloudWatch metrics and use math expressions to create new time series from them.
Question 2: An application generates logs in a custom format. What is the correct approach to parse these logs and extract specific fields for CloudWatch Logs Insights queries?
- Use a CloudWatch Logs subscription filter
- Define a metric filter with a custom pattern
- Use the parse command in Logs Insights queries (Correct answer)
- Enable Enhanced Monitoring on the log group
Correct answer: Use the parse command in Logs Insights queries
The `parse` command in CloudWatch Logs Insights extracts fields from log events using glob or regex patterns for ad-hoc querying.
Question 3: Which AWS service would you use to automatically remediate a non-compliant EC2 instance configuration detected by AWS Config?
- AWS CloudTrail
- AWS Systems Manager Automation (Correct answer)
- Amazon EventBridge
- AWS Trusted Advisor
Correct answer: AWS Systems Manager Automation
AWS Config rules can trigger AWS Systems Manager Automation documents as remediation actions when a resource becomes non-compliant.
Question 4: What is the maximum retention period for CloudWatch Logs log groups?
- 90 days
- 1 year
- 10 years
- Indefinitely (never expire) (Correct answer)
Correct answer: Indefinitely (never expire)
By default, CloudWatch Logs never expire; you can configure retention from 1 day up to 10 years, but 'Never Expire' is also a valid setting.
Question 5: A DevOps team wants to track the number of 5xx errors returned by an Application Load Balancer over time. Which ALB metric should they use?
- HTTPCode_ELB_5XX_Count (Correct answer)
- TargetResponseTime
- UnHealthyHostCount
- RejectedConnectionCount
Correct answer: HTTPCode_ELB_5XX_Count
HTTPCode_ELB_5XX_Count counts the number of HTTP 5XX server error codes generated by the load balancer itself.
Question 6: Which CloudWatch Logs feature enables near-real-time delivery of log events to Amazon Kinesis Data Streams or Lambda?
- Log Insights
- Metric Filters
- Subscription Filters (Correct answer)
- Log Aggregation
Correct answer: Subscription Filters
Subscription filters deliver a real-time feed of log events from a log group to a destination such as Kinesis, Firehose, or Lambda.
Question 7: What happens to CloudWatch alarms in an Auto Scaling group when the group scales out and new instances are added?
- Alarms automatically apply to new instances via aggregate metrics (Correct answer)
- Each new instance requires a manually created alarm
- Alarms reset to OK state whenever scaling occurs
- New instances disable existing alarms until healthy
Correct answer: Alarms automatically apply to new instances via aggregate metrics
Auto Scaling group CloudWatch alarms use aggregate metrics (e.g., average CPU across all instances), so they automatically include new instances without manual changes.
Which CloudWatch feature allows you to create a graph of a metric expression combining multiple metrics with math operations?