Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS trigger a Pipeline on ECR push action?

An AWS CodePipeline can be triggered on a commit action to AWS CodeCommit.


I do not see an option/way to trigger an AWS CodePipeline on a push action to AWS ECR. Is there a such option?

like image 706
Laimonas Sutkus Avatar asked Oct 20 '25 10:10

Laimonas Sutkus


1 Answers

If you create a Pipeline from AWS CodePipeline Console and choose Amazon ECR as source provider, it will create a CloudWatch event

{
  "source": [
    "aws.ecr"
  ],
  "detail": {
    "eventName": [
      "PutImage"
    ],
    "requestParameters": {
      "repositoryName": [
        "my-repo/nginx"
      ],
      "imageTag": [
        "0.1"
      ]
    }
  }

Target of this event will be the CodePipeline. You can inspect the Event details in AWS CloudWatch console. Whenever a Push (PutImage) occurs on the ECR repo, Pipeline will be excecuted.

like image 66
shariqmaws Avatar answered Oct 22 '25 08:10

shariqmaws



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!