What is AWS ECR Image Scanning and where does it fit in a DevSecOps pipeline?
Quick Answer
AWS ECR Image Scanning is used for container registry scanning, running at the image stage. Explain the class of problem it catches, why catching it there is cheaper than catching it in production, and how it reports findings back to developers.
Detailed Answer
Describe AWS ECR Image Scanning by the failure it prevents, not by its feature list. It belongs to container registry scanning and runs at the image stage of delivery, which matters because the cost of fixing a defect rises sharply the later it is found — the core argument behind shifting security left.
Strong answers cover basic scanning (Clair-based, on push) vs enhanced scanning (Inspector-backed, continuous), scan-on-push configuration, filtering findings by severity, lifecycle policies to expire vulnerable tags, and gating a deploy on scan results. Interviewers also listen for the operational side: who owns the rules, how findings reach the developer who introduced them, how false positives get suppressed without silently disabling coverage, and what the break-glass path is when a fix genuinely cannot ship in time.
Tie it to the wider toolchain. Security scanning is only useful when its output is actionable, deduplicated across tools, and attached to a specific commit, image digest or resource — otherwise teams learn to ignore it.
Code Example
# Where AWS ECR Image Scanning sits in the pipeline # stage: image # 1. run the scan against the artifact produced by this stage # 2. compare findings against the agreed severity threshold # 3. blocking a deploy when the pushed image reports Critical findings # 4. publish the report so developers see it on the commit or pull request
Interview Tip
Anchor AWS ECR Image Scanning to a stage and a gate: what it scans, when it runs, and what makes the build stop.