Cross-region Amazon EventBridge routing

Event bus → Rule → Event bus → Rule

Create cross-region event bus routing with Amazon EventBridge

This pattern shows how to route events in one Region's event bus to an event bus in another region. The template shows how to configure an event rule to send matching events to target event buses in another region. It includes the necessary IAM permissions to allow the rule to invoke the target in another region.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Launch Stack

Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/eventbridge-cross-region

Deploy

cd ./event-sourcesam deploy --guided


Testing

1. Using curl or Postman, invoke the API Gateway endpoint, using a *region* query parameter to determine where the event should be routed. For example: https://yourendpoint.execute-api.yourregion.amazonaws.com/Prod?region=us-east-1.
2. The event is logged by the Lambda function target in the specified region.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

James Beswick

James Beswick

I am a self-confessed serverless geek and enjoy helping developers build faster with serverless! I have been software developer and product manager before becoming a Developer Advocate. Ask me anything!

Follow on LinkedIn