CloudGuild · Blog · Cheat sheets · Lessons · Certifications
Choosing the Right AWS Messaging Service: A SAA-C03 Exam Walkthrough
Understand why AWS SNS is the best choice for microservices messaging in the SAA-C03 exam. We break down the question and options.
A common pitfall for candidates in the AWS Certified Solutions Architect - Associate exam is distinguishing between messaging services. Each option serves a different purpose, and understanding these differences is crucial.
The question
A developer is designing a solution that requires sending messages between microservices with minimal latency and cost. What AWS messaging service should they choose to achieve this?
- A. Amazon SQS
- B. Amazon SNS
- C. Amazon MQ
- D. AWS AppSync
Think before you scroll
Consider the requirements: minimal latency and cost. Each option provides messaging capabilities, but they cater to different messaging patterns. Evaluate how well each service aligns with the needs of microservices.
The answer
The correct option is B. Amazon SNS. Amazon Simple Notification Service (SNS) is specifically designed for publishing messages to multiple subscribers with low latency. It is a cost-effective solution for pub/sub messaging, making it suitable for microservices that require rapid message delivery.
Why the other options lose
- A. Amazon SQS: Amazon Simple Queue Service (SQS) is ideal for decoupled messaging between components, but it focuses on point-to-point communication rather than pub/sub. It introduces latency because messages must be polled and processed, which is not optimal for this scenario.
- C. Amazon MQ: Amazon MQ is designed for managing message brokers and supports legacy messaging protocols. It is not as cost-effective for this use case and adds unnecessary complexity for microservices that need to communicate quickly.
- D. AWS AppSync: AWS AppSync is primarily for building GraphQL APIs. It does not serve as a messaging service and is not applicable for direct message brokering between microservices.
The concept behind it
Understanding the difference between messaging patterns is key. Pub/sub messaging, as provided by SNS, allows multiple services to receive messages simultaneously. In contrast, SQS is for queue-based communication, where messages are processed in a specific order by a single consumer. Recognizing these patterns will help in selecting the right service for various architectural needs.
Exam trap to remember
Remember, for pub/sub messaging with low latency, think SNS. It’s the go-to for efficient microservice communication.