You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

已知CodeCommit可触发CodePipeline,能否通过ECR推送触发?

Can AWS ECR Image Push Trigger AWS CodePipeline?

Absolutely! While AWS CodePipeline doesn’t have a native, out-of-the-box trigger option for ECR image pushes (unlike CodeCommit’s direct integration), you can easily set this up using AWS EventBridge as a middle layer. Here’s how to do it step by step:

Step 1: Create an EventBridge Rule

  • Head to the EventBridge console and create a new rule.
  • For the event source, select AWS events or EventBridge partner events, then choose ECR as the service name and Image pushed to repository as the event type.
  • Optional: Narrow down the trigger to a specific ECR repository (or even specific image tags) by adding filters to the event pattern. For example, to only trigger when pushing images tagged prod, add a filter for detail.image-tag equals prod.

Step 2: Configure CodePipeline as the Target

  • In the rule’s target section, select CodePipeline from the target types.
  • Choose your target CodePipeline, and make sure the IAM role associated with the EventBridge rule has the codepipeline:StartPipelineExecution permission. If you don’t have an existing role, EventBridge can create one for you with the necessary permissions.

Step 3: Test the Setup

  • Push an image to your target ECR repository (matching any filters you set).
  • Check the EventBridge console to confirm the event was captured, then verify that your CodePipeline starts executing automatically.

This setup works reliably for most use cases, and you can tweak the event filters to fit your specific workflow (like triggering only for certain tags or repositories).

内容的提问来源于stack exchange,提问作者Laimonas Sutkus

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 08:16:58