AWS Certified Developer – Associate (DVA-C02) — Question 60

A company needs to harden its container images before the images are in a running state. The company's application uses Amazon Elastic Container Registry (Amazon ECR) as an image registry. Amazon Elastic Kubernetes Service (Amazon EKS) for compute, and an AWS CodePipeline pipeline that orchestrates a continuous integration and continuous delivery (CI/CD) workflow.
Dynamic application security testing occurs in the final stage of the pipeline after a new image is deployed to a development namespace in the EKS cluster. A developer needs to place an analysis stage before this deployment to analyze the container image earlier in the CI/CD pipeline.
Which solution will meet these requirements with the MOST operational efficiency?

Answer options

Correct answer: B

Explanation

Option B is the most efficient solution as it integrates image scanning seamlessly into the CI/CD pipeline right after the image is built, allowing for any vulnerabilities to be addressed before deployment. Options A and C involve scanning at different stages that may not effectively prevent issues from reaching production. Option D does not provide the optimal timing for scanning, as it occurs after the image has already been pushed, which could allow vulnerabilities to be deployed.