DVA-C02 Question 55
Select 2You are designing an event-driven architecture for a ticket booking application. When a user books a ticket, a Lambda function publishes the booking details to an Amazon SNS topic. Multiple downstream systems, including payment processing and email notification services, need to process this event independently. Which combination of AWS services should you use to ensure reliable and independent processing of these events?
- A
Amazon SNS to broadcast messages to Amazon SQS queues subscribed to the topic
- B
Amazon SNS to directly invoke multiple AWS Lambda functions for each downstream system
- C
Amazon SNS with an Amazon SQS queue per downstream system for decoupling
- D
Amazon EventBridge for routing events to downstream systems
- E
Amazon Kinesis Data Streams to stream messages to multiple consumers
Show answer and explanation
Correct answers: A, C
Explanation
In an event-driven architecture, the combination of Amazon SNS and SQS is ideal for decoupling and ensuring reliable event delivery. SNS broadcasts messages to multiple SQS queues, one for each downstream system, allowing each system to process events independently and at its own pace. This approach ensures durability and scalability while maintaining loose coupling between the components.
- A. Correct.
Correct: Using SNS to broadcast messages to SQS queues allows you to decouple the publisher from individual subscribers. Each downstream system can then independently process events from its respective queue.
- B. Incorrect.
Incorrect: While SNS can directly invoke multiple Lambda functions, this approach tightly couples the publisher to the subscribers and does not provide the same level of reliability or message durability as SQS.
- C. Correct.
Correct: Combining SNS and SQS ensures reliable delivery and decoupling. Each downstream system can have its own SQS queue, ensuring independent processing.
- D. Incorrect.
Incorrect: Amazon EventBridge is a great service for event routing, but it is not designed for durable, decoupled event processing like the SNS-SQS combination.
- E. Incorrect.
Incorrect: Amazon Kinesis Data Streams is designed for real-time streaming use cases, but it is not a replacement for SNS-SQS in event-driven architectures requiring decoupling and reliable message delivery.