AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 330

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?

Answer options

Correct answer: B

Explanation

Option B is correct because Amazon SQS automatically sends the ApproximateNumberOfMessagesVisible metric to Amazon CloudWatch, allowing the team to set up a native alarm with zero custom code or infrastructure to maintain. Options C and D are operationally inefficient as they introduce unnecessary complexity by requiring custom AWS Lambda functions and Amazon EventBridge rules. Options A and D are incorrect because monitoring ApproximateNumberOfMessagesDelayed tracks messages that are not yet available for processing, rather than the backlog of messages currently waiting in the queue.