A DevOps team manages infrastructure for an application. The application uses long-running processes to process items from an Amazon Simple Queue Service (Amazon SQS) queue. The application is deployed to an Auto Scaling group.
The application recently experienced an issue where items were taking significantly longer to process. The queue exceeded the expected size, which prevented various business processes from functioning properly. The application records all logs to a third-party tool.
The team is currently subscribed to an Amazon Simple Notification Service (Amazon SNS) topic that the team uses for alerts. The team needs to be alerted if the queue exceeds the expected size.
Which solution will meet these requirements with the MOST operational efficiency?
Comprehensive and Detailed Explanation From Exact Extract:
The Amazon SQS service publishes several standard CloudWatch metrics by default, including ApproximateNumberOfMessagesVisible, which represents the number of messages available for retrieval from the queue (i.e., the number of messages waiting to be processed). This is the primary metric to monitor queue backlog and processing delays.
Using ApproximateNumberOfMessagesVisible to monitor the visible messages in the queue gives a direct and near real-time indication of processing delays or backlog.
CloudWatch metrics are automatically collected and available without the need to create custom metrics or Lambda functions, which increases operational efficiency by reducing complexity and maintenance overhead.
Setting a CloudWatch alarm on this metric with a static threshold and a reasonable evaluation period (such as 1 hour) is sufficient to alert the team when the queue grows beyond an expected size.
The alarm can be directly configured to send notifications to an existing SNS topic, maintaining seamless integration with the team's alerting mechanisms.
The ApproximateNumberOfMessagesDelayed metric refers to messages that are delayed and not available for processing yet due to delay settings, which is not the direct backlog that causes business process delays.
Options C and D introduce unnecessary complexity by requiring Lambda functions and custom metrics or scheduled invocations, which reduce operational efficiency compared to using built-in CloudWatch metrics and alarms.
Reference from AWS Official Documentation and Study Guide:
Amazon SQS Monitoring with CloudWatch Metrics:
'Amazon SQS automatically sends metrics to CloudWatch, including ApproximateNumberOfMessagesVisible, which shows the number of messages available for retrieval.'
(Source: Amazon SQS Monitoring - AWS Documentation)
Setting CloudWatch Alarms for SQS Queues:
'You can create CloudWatch alarms on SQS metrics such as ApproximateNumberOfMessagesVisible to receive notifications when the queue size exceeds a threshold.'
(Source: Amazon CloudWatch Alarms - AWS Documentation)
AWS DevOps Engineer Professional Exam Guide:
'Efficient alerting for queue backlogs should leverage native CloudWatch metrics to minimize operational overhead.'
(Source: Official AWS Certified DevOps Engineer Professional Study Guide)
Glory
3 days agoWilliam
8 days agoLatanya
13 days agoMitzie
18 days agoCasey
23 days agoTrevor
29 days agoMaddie
1 month agoMarge
1 month agoCyndy
1 month agoRaina
2 months agoColeen
2 months agoTess
2 months ago