Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with cross-region events #10

Closed
jjmonsalveg opened this issue Jul 19, 2023 · 2 comments
Closed

Problem with cross-region events #10

jjmonsalveg opened this issue Jul 19, 2023 · 2 comments
Assignees

Comments

@jjmonsalveg
Copy link

jjmonsalveg commented Jul 19, 2023

Hi, when I created the central event bus in account B in us-east-1 and the event bus in account C in us-west-2.

I received the following error:

CREATE_FAILED     AWS::Events::Rule    InvoiceProcessingRule  

Cross-region API call is not allowed. (Service: AmazonCloudWatchEvents; Status  Code: 400; Error Code: ValidationException; Request    ID: XXXXXXXX; Proxy: null)    

to deploy I ran the commands from the readme

sam deploy --guided --region us-west-2

Sam version: SAM CLI, version 1.90.0

In the same region, all is good but I have these restrictions and I need to use different regions. Am I missing something?

@sliedig
Copy link
Contributor

sliedig commented Jul 20, 2023

Hello @jjmonsalveg, thanks for raising this. I'm currently travelling but will look into this early next week.

@sliedig sliedig self-assigned this Jul 20, 2023
@sliedig
Copy link
Contributor

sliedig commented Dec 4, 2023

@jjmonsalveg apologies for the delay in response. Take a look at the cross region example and make sure that you have the assume role defined that allows the event bus in one account to an event bus in the other account and region.

  SourceToDestinationEventBusRole:
    Type: "AWS::IAM::Role"
    Properties:
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - events.amazonaws.com
            Action:
              - "sts:AssumeRole"
      Path: /
      Policies:
        - PolicyName: PutEventsOnDestinationEventBus
          PolicyDocument:
            Version: 2012-10-17
            Statement:
              - Effect: Allow
                Action: "events:PutEvents"
                Resource:
                  - !Ref SecurityEventBusArn

@sliedig sliedig closed this as completed Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants