AWS Certified Solutions Architect Professional SAP-C02 Practice Question

A company has a multi-account AWS strategy using AWS Organizations. A central 'Shared Services' account hosts private Amazon ECR repositories with approved base container images. Multiple 'Development' accounts must use these base images to build and deploy their containerized applications to Amazon EKS clusters. A strict security mandate requires that no container image with 'CRITICAL' or 'HIGH' severity vulnerabilities, as identified by ECR's 'scan on push' feature, can be deployed. The solution must be automated and prevent vulnerable images from being deployed to the EKS clusters.

Which approach meets these requirements MOST effectively and securely?

  • Configure 'scan on push' in the Development accounts' ECR repositories. Use an Amazon EventBridge rule to trigger an AWS Lambda function upon scan completion. The Lambda function will inspect the scan results and, if 'CRITICAL' or 'HIGH' vulnerabilities are found, use the ecr:BatchDeleteImage API to immediately remove the vulnerable image from the repository.

  • Configure 'scan on push' in the Development accounts' ECR repositories. Use an Amazon EventBridge rule to trigger an AWS Lambda function that, upon scan completion, inspects the results. If vulnerabilities are found, the function writes the image digest and a 'BLOCKED' status to an Amazon DynamoDB table. In the EKS clusters, deploy a validating admission webhook that queries the DynamoDB table and rejects any pod creation request specifying a 'BLOCKED' image.

  • Configure 'scan on push' in the Development accounts' ECR repositories. Mandate a new stage in all CI/CD deployment pipelines that calls an AWS Lambda function. This function will use the DescribeImageScanFindings API to check for 'CRITICAL' or 'HIGH' vulnerabilities. If found, the function will return an error, causing the pipeline to fail and stop the deployment.

  • Configure 'scan on push' in the Development accounts' ECR repositories. Use an Amazon EventBridge rule to trigger an AWS Lambda function that adds a specific tag (e.g., 'status:vulnerable') to the vulnerable image digest. Apply a repository policy on the ECR repositories that denies the ecr:BatchGetImage and ecr:GetDownloadUrlForLayer actions if the image has a condition tag of 'status:vulnerable'.

AWS Certified Solutions Architect Professional SAP-C02
Accelerate Workload Migration and Modernization
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot