AWS Certified Solutions Architect – Associate (SAA-C03)Design Resilient ArchitecturesMedium
A company is designing a microservices application where different services need to communicate asynchronously. Each service processes messages independently, and messages must be reliably delivered even if a service is temporarily unavailable. The solution should also allow for fan-out messaging to multiple consumers. Which AWS messaging service should be used?
- AAmazon SQS (Simple Queue Service)
- BAmazon SNS (Simple Notification Service)
- CAmazon Kinesis Data Streams
- DAWS Step Functions
Show answer & explanationAnswer & explanation
Correct answer: B. Amazon SNS (Simple Notification Service)
Amazon SNS is a fully managed messaging service for both application-to-application (A2A) and application-to-person (A2P) communication. It allows fan-out messaging, where one message published to a topic can be delivered to multiple subscribers, including SQS queues for reliable, asynchronous processing by independent services.
Why the other options are wrong
- A. SQS is a message queue for one-to-one or one-to-many (with multiple polls) asynchronous communication, but its primary function isn't fan-out to multiple diverse subscribers directly.
- C. Kinesis Data Streams is for real-time streaming data ingestion and processing, not general-purpose asynchronous messaging with fan-out to diverse subscribers.
- D. Step Functions orchestrates workflows, not a primary messaging service for independent service communication.
Amazon SNS (Simple Notification Service)
A fully managed messaging service that enables you to send messages to a large number of subscribers (fan-out) via a 'topic'. Subscribers can be SQS queues, Lambda functions, HTTP endpoints, email, or SMS.
- Publish/Subscribe model.
- Supports fan-out to multiple endpoints simultaneously.
- Decouples publishers from subscribers.
- Often used with SQS for reliable message delivery to services.
Memory trick: SNS: Send to Many, SQS: Queue for One.