I want to configure my Amazon EventBridge rules in one AWS account to send events to a custom event bus in another account.
Resolution
From the destination account, create an event bus and configure the following resource-based policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "WebStoreCrossAccountPublish",
"Effect": "Allow",
"Action": [
"events:PutEvents"
],
"Principal": {
"AWS": "arn:aws:iam::AccountA:root"
},
"Resource": "arn:aws:events:Region:AccountB:event-bus/central-event-bus"
}
]
}
Note: Replace AccountA with your AWS account ID for the source account, Region with the AWS Region of the destination account, and AccountB with the account ID of the destination account.
Then, complete the following steps to configure the rule:
- Open the EventBridge console in the source account.
- In the navigation pane, choose Rules, and then choose Create rule.
- For Select event bus, choose AWS default event bus.
- For Select targets, choose Target, and then choose Event Bus in another AWS account.
- Choose Event Bus, and then enter the Amazon Resource Name (ARN) of the destination account's event bus.
- For Role, select an AWS Identity and Access Management (IAM) role that has PutEvents permissions for the destination event bus. If there's not an existing role that you can use, then create an IAM role with the following permissions policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"events:PutEvents"
],
"Resource": [
"EventBusARN"
]
}
]
}
Note: Replace EventBusARN with the ARN of the destination account's event bus.
- Choose Create rule.
Related information
Sending and receiving events between AWS accounts in Amazon EventBridge