Course contentsShow
← Cloud and Infrastructure
Lesson 1089 of 2,98921. Container RegistriesFree lesson

ECR Image Scanning with Inspector

Enable and configure automated vulnerability scanning for container images in ECR.

ECR Image Scanning with Inspector

What You'll Learn

You'll learn how to automatically detect vulnerabilities in your container images stored in Amazon ECR using AWS Inspector.

Why Automated Scanning Matters

Imagine deploying a container that contains a known security flaw—like leaving your front door unlocked. ECR's integration with AWS Inspector acts as a security guard that automatically checks every image for known vulnerabilities before (or after) you deploy it.

How ECR Image Scanning Works

When you enable automated scanning on an ECR repository, AWS Inspector analyzes your container images against databases of known vulnerabilities (CVEs). This happens automatically when you push a new image, saving you from manual security reviews.

Enabling Scan on Push

You configure scanning at the repository level. When "scan on push" is enabled, ECR triggers Inspector every time a new image lands in your repository. Inspector examines the operating system packages and language-specific dependencies, then generates a report with severity ratings (critical, high, medium, low).

Two Scanning Types

  • Basic scanning: Uses the open-source Clair scanner (now being phased out)
  • Enhanced scanning (Inspector v2): Provides continuous monitoring, deeper analysis, and covers more languages and package managers

Viewing Scan Results

After a scan completes, you can view findings through the ECR console or API. Each finding includes the CVE identifier, affected package, severity, and often remediation advice (like "upgrade to version X").

This integration with IAM means you can set policies to block deployments of images with critical vulnerabilities, enforcing security gates in your pipeline.

Key Takeaway: ECR image scanning with Inspector automates vulnerability detection at push time, giving you immediate visibility into security risks before containers reach production.