I have a requirement for ECR Cross Account Replication. I have 2 AWS Accounts, Account-A(Source) and Account-B(Destination). Am able to replicate image successfully from Source to Destination and using CodePipeline to create image. When new image is replicated to ECR repo in Destination Account, pipeline should trigger automatically at Destination Account with CloudWatch Eventbridge, but pipeline is not triggering. I have created below Event Rule for same to trigger the pipeline at Destination.
{
"source": ["aws.ecr"],
"detail-type": ["ECR Image Action"],
"detail": {
"action-type": ["PUSH"],
"result": ["SUCCESS"],
"repository-name": ["repo_name"]
}
}
When I used same Event rule in Source, it was able to trigger pipeline automatically. But after doing cross account replication, pipeline is not triggering in Destination with same event rule.
is there different approach for Cross Account replication to trigger pipeline in Destination account?