
Answer-first summary for fast verification
Answer: Configure an Amazon SNS dead letter queue that has an Amazon Simple Queue Service (Amazon SQS) target with a retention period of 14 days.
## Explanation **Correct Answer: C** Amazon SNS supports dead-letter queues (DLQs) to capture messages that cannot be delivered to subscribers. When configuring an SNS subscription to an HTTPS endpoint, you can set up a DLQ to capture undeliverable messages. The most appropriate solution with the least development effort is: 1. **Amazon SNS Dead Letter Queue with Amazon SQS target** - This is a native integration where SNS can directly send failed messages to an SQS queue. 2. **SQS Retention Period** - SQS queues can be configured with a message retention period of up to 14 days (maximum is actually 14 days). **Why Option C is correct:** - **Least Development Effort**: SNS has built-in support for SQS as a DLQ target. This requires minimal configuration. - **Retention Period**: SQS supports message retention up to 14 days, meeting the requirement. - **Analysis Capability**: Messages in SQS can be easily analyzed using standard AWS tools or by consuming the queue. **Why other options are incorrect:** **Option A (Kinesis Data Stream)**: - Kinesis Data Streams have a maximum retention period of 365 days, but this requires more development effort to set up and analyze. - Not a native DLQ target for SNS like SQS is. - More complex to implement and analyze messages. **Option B (Add SQS queue between application and SNS)**: - This changes the architecture fundamentally by inserting a queue before SNS. - Doesn't address the specific requirement of capturing undelivered messages from SNS to HTTPS endpoint. - Would require application changes to send to SQS instead of SNS. **Option D (DynamoDB with TTL)**: - While DynamoDB can store messages, it's not a native DLQ target for SNS. - Requires more development effort to set up Lambda functions or custom code to write failed messages to DynamoDB. - TTL in DynamoDB deletes items automatically, which might not be ideal for analysis. **Key AWS Concepts:** - **SNS Dead Letter Queues**: Capture messages that cannot be delivered to subscribers after maximum retries. - **SQS Retention**: Configurable from 1 minute to 14 days (default is 4 days). - **HTTPS Endpoint Subscription**: When SNS sends to HTTPS endpoints, delivery failures can occur due to endpoint unavailability, timeouts, or HTTP errors. **Best Practice**: Use SQS as DLQ for SNS when you need to retain and analyze undelivered messages with minimal development overhead.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
An ecommerce company runs an application in the AWS Cloud that is integrated with an on-premises warehouse solution. The company uses Amazon Simple Notification Service (Amazon SNS) to send order messages to an on-premises HTTPS endpoint so the warehouse application can process the orders. The local data center team has detected that some of the order messages were not received.
A solutions architect needs to retain messages that are not delivered and analyze the messages for up to 14 days.
Which solution will meet these requirements with the LEAST development effort?
A
Configure an Amazon SNS dead letter queue that has an Amazon Kinesis Data Stream target with a retention period of 14 days.
B
Add an Amazon Simple Queue Service (Amazon SQS) queue with a retention period of 14 days between the application and Amazon SNS.
C
Configure an Amazon SNS dead letter queue that has an Amazon Simple Queue Service (Amazon SQS) target with a retention period of 14 days.
D
Configure an Amazon SNS dead letter queue that has an Amazon DynamoDB target with a TTL attribute set for a retention period of 14 days.