AWS Certified Solutions Architect – Associate (SAA-C02) — Question 124

A solutions architect is moving the static content from a public website hosted on Amazon EC2 instances to an Amazon S3 bucket. An Amazon CloudFront distribution will be used to deliver the static assets. The security group used by the EC2 instances restricts access to a limited set of IP ranges. Access to the static content should be similarly restricted.
Which combination of steps will meet these requirements? (Choose two.)

Answer options

Correct answer: A, B

Explanation

Option A is correct because creating an origin access identity (OAI) and modifying the bucket policy allows only CloudFront to access the S3 bucket, ensuring security. Option B is also correct as using an AWS WAF web ACL with the same IP restrictions as the EC2 security group helps maintain similar access controls. The other options do not effectively restrict access or are not applicable for controlling access to S3 content via CloudFront.