SAP-C02 exam dumps

SAP-C02 practice question 674 of 678

AWS Certified Solutions Architect - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

SAP-C02 Question 674

Single answer

A company runs an e-commerce platform and needs to process customer orders as quickly as possible. Each order needs to trigger multiple downstream services, such as payment processing, inventory updates, and shipping notifications, all of which run independently. The company also wants to ensure that if one downstream service fails, it does not impact the processing of other services, and retries should be attempted for failed events. Which solution should you design to meet these requirements?

  1. A

    Use an Amazon SQS queue to store all orders and have each downstream service poll the queue for messages.

  2. B

    Use Amazon SNS to publish order events to multiple downstream services as subscribers.

  3. C

    Use AWS Step Functions to orchestrate the workflow for each order, calling each downstream service in sequence.

  4. D

    Use Amazon EventBridge to create rules that route order events to the respective downstream services.

Show answer and explanation

Correct answer: B

Explanation

The best solution for this scenario is Amazon SNS because it natively supports the fan-out pattern required to notify multiple downstream services independently. It ensures that all downstream services can process events concurrently, and failures in one service do not impact others. Additionally, SNS provides retry mechanisms for failed notifications, meeting the requirement for reliability. While other services like Amazon SQS, Step Functions, or EventBridge could be used, they introduce unnecessary complexity or do not fully align with the scenario's requirements.

  • A. Incorrect.

    Using an Amazon SQS queue for all orders would introduce challenges in ensuring all downstream services are notified of an event. Each service would need to independently poll the queue, which complicates the solution and does not align well with the requirement to process events as quickly as possible.

  • B. Correct.

    Amazon SNS is designed for fan-out scenarios where a single event needs to notify multiple downstream subscribers independently. It ensures that failures in one subscriber do not impact others, and retry logic can be applied for failed deliveries. This aligns well with the requirements of the scenario.

  • C. Incorrect.

    AWS Step Functions is useful for orchestrating complex workflows in a sequence, but it is not ideal for this use case where services need to process events independently and concurrently. A failure in one service could block the entire workflow.

  • D. Incorrect.

    Amazon EventBridge is a powerful event bus service, but it is better suited for event-driven architectures where event filtering and routing are required. Although it can route events to multiple targets like SNS, the question does not specify complex event routing needs, making SNS a more straightforward and efficient choice.

Timed practice exam

Take a SAP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam