Event rules in multiple accounts calling one lambda function in a single account; How to achieve tihs?

0

I have a use case where I have a Lambda in one central account that calls an external service using an HTTP client specified in the lambda code. I also have event rules that I wanted placed in all my accounts in the organization for the test accounts and PROD accounts. Once the specified event happens specified in the evnet rule, it should trigger the Lambda in the central account.

My concern and question: I am not sure if I need to create another event bus or if I still use the default event bus in these accounts where the event rule is located.

Do I need to create a custom event bus in all these accounts or can the evnet rules go to the event bus in my central account with a lambda function? Basically is there anything I need to add to make this work?

Also the IAM policies I'm assuming will need to be changed since this is a cross account call.

1 Answer
1
Accepted Answer

Hello.

When using EventBridge cross-account, the event sending account must be able to access the EventBus of the event receiving account, as described in the documentation below.
In other words, the configuration needs to be as shown below.
There is no problem with the default EventBus for the Central Account.
However, the default EventBus also sends Events created from AWS, so if you want to send custom events, it may be easier to manage permissions by creating a custom EventBus.
You need to edit the permissions so that it can be accessed from the Prod Account's EventRule.
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cross-account.html
a

I think the following blog will be helpful for settings.
https://repost.aws/articles/ARIw6q_ozaTmqqI25Eq4YIcQ/a-step-by-step-guide-to-cross-account-and-cross-region-events-with-eventbridge

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions