‹ All SAP-C02 questions

SAP-C02 Practice Question 33: Cross Account Event Distribution

AWS Certified Solutions Architect – Professional (SAP-C02) · Test 4 · question 3 of 10

Design for New Solutionsmedium

An order management service publishes about 4,000 business events per minute. Six downstream teams, each in its own AWS account inside the same organization, consume these events. Today the order service holds a hard-coded list of the consumers' Amazon SQS queue ARNs and writes to each of them, so onboarding a seventh team means a code change, a pull request, and a production deployment of the order service.

The replacement must let a consumer be added or removed without touching or redeploying the order service, must let each consumer subscribe only to the event types and payload attributes it cares about, and must let a newly onboarded team replay the previous 30 days of events into its own environment without asking the order service to re-emit anything.

Which design should the architect choose?

Select one answer
Show answer and explanation

Answer:

  • D. Create a central custom Amazon EventBridge event bus whose resource-based policy lets the organization put events on it, have the order service publish each event once, forward events to each consumer account's event bus with a rule, and enable an archive on the central bus

EventBridge is built for cross-account event distribution. Permissions on an event bus are granted with a resource-based policy that can name an AWS organization ID rather than individual accounts, so the order service publishes to one bus and never learns who is listening. Each consumer is wired up by adding a rule on the central bus that targets the event bus in that consumer's account; adding or removing a consumer is a rule change in the hub, with no deployment of the order service. Consumers then write their own rules with event patterns that match on any field of the event's JSON, so each team filters to exactly what it needs. The archive on the central bus is what satisfies the last requirement: archived events can be replayed into a bus later, so a team onboarded in week five can reprocess the previous 30 days on its own.

Option A covers fanout and filtering but not replay. An SNS topic delivers to current subscribers only; there is no retained history to replay for a consumer that subscribes later, so the order service would have to re-emit, exactly what the stem forbids.

Option B is not a fanout mechanism at all. An SQS message is consumed once, so six consumers polling one queue would each steal messages intended for the others.

Option C makes every consumer responsible for stream positioning, shard management, and discarding 99 percent of the records it reads, and each new consumer competes for read throughput unless enhanced fan-out is added. It also pushes the filtering the stem asked for into six separate codebases.

Reference: Sending and receiving events between AWS accounts in Amazon EventBridge

Practice Test 4 ›

Study guides for SAP-C02