Certopolis

AWS Certified Solutions Architect – Professional

EventBridge cross-account and cross-Region events for SAP-C03

The Amazon EventBridge guide gives three steps. The receiving account edits its event bus policy to allow the senders, by account ID or organization ID. Each sending account creates a rule whose target is the receiving bus, with an IAM role. The receiving account creates rules that match the events. A forwarded event is not sent to a third account.

The receiving side: bus policy and rules

An event bus accepts events from other accounts only if its resource-based policy allows them. The policy can name account IDs, or it can use an IAM condition to admit a whole organization by its organization ID. An organization grant admits every account in that organization, so the policy does not list accounts one by one.

Rules on the receiving bus match forwarded events like any other event. A rule with no account field in its event pattern matches events from every account the bus admits. To limit a rule, list account IDs in account. Do not use * there: it matches nothing, because * never appears in an event's account field. If a bus accepts events from all AWS accounts, AWS strongly recommends an account filter on every rule.

Events sent between accounts are charged to the sending account as custom events. The receiving account is not charged.

The sending side: forwarding rules and roles

Each sending account needs a rule on its own bus with the receiving bus ARN as the target. Nothing is pulled from the central account, so with many accounts the forwarding rule has to be deployed to each one. The rules that do the real work stay in the central account.

New cross-account bus targets must have an IAM role. This applies to targets created after March 2, 2023. A sender that gets its permission from an organization grant needs the role in any case. The console creates the role, and with the AWS CLI you create it yourself. AWS recommends roles on every bus target so that service control policies apply to who can send events.

EventBridge delivers one hop. If the receiving account has a rule that sends those events to a third account, they are not sent. The same applies to three buses in one account. A design that relays events through a collector account to a second account does not work. Give the source rule several targets instead, one for each bus that must receive the event.

Cross-Region routing and global endpoints

A bus in another Region is a rule target like a bus in another account: the target is the bus ARN. Accounts in different Regions can exchange events when the destination Region is a supported cross-Region destination. The destination bus policy must still allow the sender. To add a central Region next to existing collectors, add a second target to the source rules and allow the source accounts on the new bus.

A global endpoint handles Regional failover for custom events at ingestion. It has a primary and a secondary Region and a Route 53 health check. When the health check reports unhealthy, custom events are routed to the bus in the secondary Region within minutes. When it reports healthy, events go to the primary Region again. Applications must add the endpointId and EventBusName to their PutEvents calls.

With custom buses, the bus in each Region must have the same name and be in the same account. Event replication sends every custom event to both Regions with managed rules. It is required for automatic recovery. Without it you reset the health check by hand before events return to the primary Region. Replication increases cost, and events are processed in the secondary Region asynchronously. With the recommended alarm configuration AWS states an RTO and RPO of 360 seconds, with a maximum of 420.

Where the exam catches people

  • Believing a bus policy alone moves events to the central account: each sending account needs a rule that targets the central bus, with an IAM role.
  • Believing account: * in a rule matches every sending account: it matches no events. Omit the account field.
  • Believing events can be relayed from account A through account B to account C: forwarded events are not sent on to a third account.
  • Believing a global endpoint can pair buses with different names or in different accounts: the custom bus must have the same name in each Region and be in the same account.
  • Believing a global endpoint returns to the primary Region by itself without replication: event replication is required for automatic recovery.

Written from these sources

Try 3 questions on this

Pick an answer to see why each option is right or wrong.

  1. A company has 120 member accounts in AWS Organizations and adds accounts every month, using AWS CloudFormation StackSets with automatic deployment. A central operations team wants Amazon EC2 instance state-change events from every member account to start one AWS Step Functions workflow in a central account. The team will maintain a single set of rules in the central account only. The central account's custom event bus already has a resource-based policy that allows events:PutEvents from the organization. Which combination of steps should the solutions architect take to meet these requirements? (Select TWO.)

    Right. In the game that’s Renown for your Architecture Design and Implementation Built for the Cloud building.

    Not that one: A,C is right. In the game your Architecture Design and Implementation Built for the Cloud building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    The hub's single rule matches those events and starts the workflow. That rule must leave the account field out of its pattern: when the field is absent, the rule matches events from every account the bus admits, which is what a growing organization needs.

    Written from docs.aws.amazon.com/eventbridge/latest/userguide/eb-cross-account.html

  2. A company uses AWS Organizations with workload accounts in eu-west-1 and ap-southeast-2. In each workload account, an Amazon EventBridge rule forwards selected security events to a collector event bus that a central security account runs in the workload's own Region. A new compliance requirement states that the same events must also be processed by one set of rules on an event bus that the security account runs in us-east-1. The collector buses must keep receiving the events, and no custom code is allowed. Which combination of steps should a solutions architect take to meet these requirements? (Select TWO.)

    Right. In the game that’s Renown for your Architecture Design and Implementation Built for the Cloud building.

    Not that one: A,C is right. In the game your Architecture Design and Implementation Built for the Cloud building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    Because those events now arrive from the workload accounts, the us-east-1 bus policy has to allow events:PutEvents from them. The collector buses keep their existing feed and no code is written.

    Written from docs.aws.amazon.com/eventbridge/latest/userguide/eb-cross-region.html

  3. A company runs workloads in 60 member accounts of AWS Organizations across us-east-1 and us-west-2. Applications in every member account publish custom security events with the Amazon EventBridge PutEvents API. A security account has an event bus in each of the two Regions with identical rules that start response workflows, and both buses allow events:PutEvents from the organization. A shared-services account runs a collector bus in each Region that accepts events from the whole organization and keeps a copy for auditors. Security events must keep reaching the response rules during a full outage of us-east-1, and ingestion must return to us-east-1 automatically after recovery. The response workflows are idempotent. Which solution will meet these requirements?

    Right. In the game that’s Renown for your Architecture Design and Implementation Built for the Cloud building.

    Not that one: A is right. In the game your Architecture Design and Implementation Built for the Cloud building would lose a little Renown, and this question would come back later.

    Show the full explanation and doc quotes

    During a us-east-1 outage the endpoint sends their events to the us-west-2 bus, and with replication turned on it moves ingestion back on its own once the health check recovers. Two details then decide the design. The endpoint's custom buses must share one name in both Regions, which rules out Region-suffixed names. And each member bus must target the security account directly, because a relay through the collector account would be a second cross-account hop, which EventBridge does not deliver. Duplicates from replication are absorbed by the idempotent workflows.

    Written from docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html

Ask for something