Posted On: Nov 21, 2019
You can now better integrate your application CICD process with Amazon Elastic Container Registry (ECR) by using events that ECR emits to Amazon EventBridge. Amazon ECR is a fully managed container registry that makes it easy for developers to store, manage and deploy container images. Amazon EventBridge (formerly called Amazon CloudWatch Events) is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources. Using ECR events, you can trigger actions such as starting a pipeline or posting a message when your image is successfully pushed.
ECR automatically generates events when images are pushed into or deleted from your repositories. You can then create rules in your EventBridge account using image push or image deleted events as the trigger, routing a push event to an AWS service like AWS CodePipeline, which in turn can take an action such as starting a deployment. A push or delete event can be used to trigger an AWS Lambda function to post a message to your Slack, Chime or Teams room. For applications that are rebuilt when their base images change, for example to pick up the latest security patches, a push event from the base image repository can trigger rebuilds of derivative images.
EventBridge support in ECR is available in all public AWS Regions. To learn more, see EventBridge Events in the Amazon ECR User Guide. To get started, go to your EventBridge console and select the ECR Image Action event type as your source to build your rules.