aws-deployment-framework icon indicating copy to clipboard operation
aws-deployment-framework copied to clipboard

[Bug]: Pipelines not triggered automatically on changes in source CodeCommit repository

Open lasv-az opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

Although there is an Event Rule created for this in adf-build/shared/cdk/cdk_constructs/adf_events.py, the deployment is not triggered automatically since there is not a policy set in the default Event Bus (deployment account) that allows the source account to perform PutEvent actions on it.

Expected Behavior

Pipelines to start automatically on source repositories changes.

Current Behavior

Pipelines are not executed automatically

Steps To Reproduce

  1. Push some change to a codecommit repository in the source account
  2. Check in the deployments account that the corresponding pipeline is not triggered automatically

Possible Solution

Add the following policy to the Event Bus:

{ "Version": "2012-10-17", "Statement": [{ "Sid": "allow_account_to_put_events", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::${SOURCE_ACCOUNT}:root" }, "Action": "events:PutEvents", "Resource": "arn:aws:events:eu-west-1:${DEPLOYMENTS_ACCOUNT}:event-bus/default" }] }

Additional Information/Context

No response

ADF Version

3.2.0

lasv-az avatar Feb 16 '23 11:02 lasv-az

I can confirm - We have the same issue right now in a fresh setup.

AndyEfaa avatar Feb 16 '23 13:02 AndyEfaa