A CI/CD pipeline builds container images, pushes them to Amazon ECR, and then deploys to an EKS development namespace for dynamic testing. The team wants to add an image analysis stage earlier in the pipeline to scan images before deploying to EKS. Which solution provides the most operational efficiency?
Choose an answer
Tap an option to check your answer.
Correct answer: Add a CodePipeline stage after the image build. Enable ECR basic image scanning on push. Use a Lambda action to read the scan results and fail the pipeline if findings exist..
Why this is the answer
The most operationally efficient solution is to integrate image scanning directly into the CI/CD pipeline using AWS native services. Adding a CodePipeline stage after the image build allows ECR basic image scanning to run automatically when the image is pushed. A Lambda function can then be triggered to evaluate the scan results. If critical vulnerabilities are found, the Lambda can fail the pipeline, preventing the deployment of insecure images. This approach leverages ECR's built-in capabilities, automates the scanning process, and provides immediate feedback within the pipeline, minimizing manual intervention and ensuring security early in the development lifecycle. Building images locally and using pre-commit hooks is a good practice but doesn't guarantee all images pushed to ECR are scanned, as hooks can be bypassed. Scanning source code is important but doesn't address vulnerabilities introduced during the container image build process or in base images. Modifying the deployment stage to check scan results means the image has already been pushed and potentially made available, which is later in the process than desired for early detection.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed