Q9 — AWS DOP-C02 Ch.3
Question 9 of 100 | ← Chapter 3
A development team is building an e-commerce application and uses Amazon Simple Notification Service (Amazon SNS) to send order messages to multiple endpoints. One of those endpoints is an external HTTP endpoint that is not always available. If an order message fails to be delivered to the HTTP endpoint, the development team needs to be notified. What should a DevOps engineer do to meet these requirements?
- A. Create an Amazon Simple Queue Service (Amazon SQS) queue. On the SNS topic, configure a redrive policy to send undelivered messages to the SQS queue. Create an Amazon CloudWatch alarm on the new SQS queue to notify the development team when messages arrive in the queue.
- B. Create an Amazon Simple Queue Service (Amazon SQS) queue. On the HTTP endpoint subscription of the SNS topic, configure a redrive policy to send undelivered messages to the SQS queue. Create an Amazon CloudWatch alarm on the new SQS queue to notify the development team when messages arrive in the queue. ✓
- C. On the SNS topic, configure an HTTPS delivery policy that retries delivery until the order message is successfully sent. Configure the BackoffFunction parameter in the policy to notify the development team when the message fails to deliver within the configured constraints.
- D. On the HTTP endpoint subscription of the SNS topic, configure an HTTPS delivery policy that retries delivery until the order message is successfully delivered. Configure the BackoffFunction parameter in the policy to notify the development team when the message fails to deliver within the configured constraints.
Correct Answer: B. Create an Amazon Simple Queue Service (Amazon SQS) queue. On the HTTP endpoint subscription of the SNS topic, configure a redrive policy to send undelivered messages to the SQS queue. Create an Amazon CloudWatch alarm on the new SQS queue to notify the development team when messages arrive in the queue.
Explanation
B is correct: https://docs.aws.amazon.com/sns/latest/dg/sns-message-delivery-retries.html — 'To retain messages after the number of retries specified in the delivery policy is exhausted, configure your subscription to move undeliverable messages to a dead-letter queue (DLQ).' https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-available-cloudwatch-metrics.html