AWS Certified Developer – Associate (DVA-C02)Development with AWS ServicesEasy
A developer is building a new microservice that needs to asynchronously process messages from other services. The messages are critical and must not be lost if the consuming service experiences a temporary outage or overload. The developer needs to ensure that messages are delivered at least once and that the consuming service can scale independently based on the message backlog. Which AWS service should the developer choose to meet these requirements?
- AAmazon Kinesis Data Streams
- BAmazon SQS Standard Queue
- CAWS Step Functions
- DAmazon SNS
Show answer & explanationAnswer & explanation
Correct answer: B. Amazon SQS Standard Queue
Amazon SQS Standard Queues provide a reliable, highly available, and scalable message queuing service. It ensures at-least-once delivery, messages are retained until processed, and consumers can pull messages at their own pace, making it ideal for decoupling and asynchronous processing with guaranteed delivery.
Why the other options are wrong
- A. Kinesis Data Streams is designed for real-time data streaming and analytics, not typical asynchronous message queuing with individual message processing guarantees like SQS.
- C. AWS Step Functions orchestrates workflows, which is different from a simple message queue. While it can handle asynchronous tasks, it's not the primary service for basic message buffering and decoupling.
- D. SNS is a publish/subscribe service for fan-out messaging, primarily for notifications. While it can deliver messages to SQS, SNS itself does not provide message retention for consumers that are offline, or a queue for independent scaling based on backlog.
Amazon SQS Standard Queue
A highly scalable, fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications. It offers at-least-once delivery and message retention.
- Decouples producers and consumers.
- At-least-once message delivery.
- Messages retained for up to 14 days.
- Scales automatically with demand.
Memory trick: SQS 'Saves' your messages for 'Scalable' processing.