AWS Certified Solutions Architect Professional SAP-C02 Practice Question
A retail company publishes tens of thousands of order events per minute to an Amazon SNS standard topic in the us-east-1 Region. Several containerized microservices that run on Amazon ECS Fargate consume the events independently. During blue/green deployments, any one of these microservices can be offline for up to 12 hours. The architecture team sets the following reliability requirements:
Every microservice must still receive exactly one copy of every event after it comes back online.
Events that fail processing more than five times must be sidelined so they do not block newer events.
The solution should minimize custom reliability code and ongoing operations.
Which design meets these requirements?
Trigger an AWS Step Functions Standard workflow from the SNS topic and invoke each microservice as a task with the retry count set to five and an exponential back-off policy.
Replace the SNS topic with an Amazon Kinesis Data Stream set to 24-hour retention; have each microservice read from the stream using the Kinesis Client Library and checkpoint its sequence numbers in DynamoDB.
Create an Amazon SQS FIFO queue for each microservice, subscribe the queues to the SNS topic, enable content-based deduplication, set the message-retention period to two days, and configure a redrive policy that sends messages to a FIFO dead-letter queue after five receives.
Subscribe each microservice directly to the SNS topic over HTTPS and configure a custom delivery policy that retries for 3,600 seconds with exponential back-off; attach a dead-letter queue to the subscription.
An Amazon SQS FIFO queue subscribed to the SNS topic provides each microservice with a durable buffer. With a message retention period of up to 14 days, it easily covers the 12-hour outage window. To meet the 'exactly-once' delivery requirement when subscribing a FIFO queue to a standard SNS topic, content-based deduplication must be enabled on the queue; this prevents duplicate messages published by SNS (which has at-least-once delivery) from being added to the queue. A redrive policy configured with a maxReceiveCount of five sends poison-pill messages to a dead-letter queue (DLQ), preventing them from blocking other messages. This design meets all requirements using managed services and minimal custom code.
Direct HTTP(S) subscriptions are unsuitable. This pattern lacks a durable, persistent queue to hold messages during the 12-hour outage. While SNS has a configurable retry policy, it relies on the consumer endpoint being available. Furthermore, it provides at-least-once delivery, requiring each microservice to implement custom deduplication logic to meet the 'exactly-once' requirement.
Amazon Kinesis Data Streams provide at-least-once delivery and would require significant custom code for checkpointing and idempotent processing to prevent duplicates, violating the requirement to minimize custom solutions.
AWS Step Functions workflows triggered by SNS do not provide a durable buffer for events if the target service is offline for an extended period. The workflow execution would eventually fail after exhausting its retries, and the event would be lost.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is an Amazon SQS FIFO queue required for this solution?
Open an interactive chat with Bash
What is content-based deduplication, and why is it important in this setup?
Open an interactive chat with Bash
What is a redrive policy, and how does it handle poison-pill messages?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Design for New Solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access