Tired of setting up CodeBuild just to push Docker images or run vulnerability scans?

With AWS CodePipeline’s new ECRBuildAndPublish and InspectorScan actions, you can now build, publish, and secure your images directly within your pipeline—no extra setup needed. Curious how it works? Let’s dive in!

Motivation

26 November, 2024 – Just ahead of re:Invent 2024, AWS released an exciting update introducing ECRBuildAndPublish and InspectorScan actions. This update simplifies building and publishing Docker images, letting your pipeline handle it seamlessly.

What Does This Update Mean for You?

Before the Update 😭

To incorporate Docker image builds and vulnerability scans into your pipeline, you had to manually configure a CodeBuild project. This involved:

After the Update 🤩

With the new ECRBuildAndPublish and InspectorScan actions in CodePipeline, all of this complexity is removed:

This update not only simplifies pipeline configuration but also lowers the barrier to entry for automating containerized workflows, enabling teams to focus more on innovation rather than operational details.

Key Notes on These Actions

See It in Action: Setting Up ECRBuildAndPublish and InspectorScan in CodePipeline

Architecture Diagram

Prerequisites

Note: I am using a vulnerable DockerFile containing Log4j cve for this blog to show the results of vulnerability scan by code pipeline action. DON’T USE IT IN PRODUCTION

Create the ECR repository

Create the Pipeline

Note: If you see error toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading then try to use the base image from AWS ECR public gallery

A big Problem 🚨

Testing AWS InspectorScan

Testing InspectorScan’s SourceCodeScan

Testing InspectorScan’s ECRImageScan

From Solutions Architect Perspective

This update is a game-changer for teams looking to innovate faster while ensuring robust security measures.

📣 What are your thoughts on these updates?

🔍 Have you encountered similar challenges or found creative workarounds?

 

このウェブサイトでは、よりよいユーザー体験のためにCookieを使用しています。詳細は、Cookieに関する方針をご参照ください。OK をクリックまたは本サイトの利用を続行することで、我々がCookieを使用することに同意したとみなされます。