
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A solutions architect must design a solution that uses Amazon CloudFront with an Amazon S3 origin to store a static website. The company's security policy requires that all website traffic be inspected by AWS WAF. How should the solutions architect comply with these requirements?
A
Configure an S3 bucket policy to accept requests coming from the AWS WAF Amazon Resource Name (ARN) only.
B
Configure Amazon CloudFront to forward all incoming requests to AWS WAF before requesting content from the S3 origin.
C
Configure a security group that allows Amazon CloudFront IP addresses to access Amazon S3 only. Associate AWS WAF to CloudFront.
D
Configure Amazon CloudFront and Amazon S3 to use an origin access identity (OAI) to restrict access to the S3 bucket. Enable AWS WAF on the distribution.
Explanation:
Correct Answer: D
Why Option D is correct:
Why other options are incorrect:
Option A: AWS WAF doesn't have an ARN that can be used in S3 bucket policies. S3 bucket policies can restrict access based on CloudFront OAI, specific IP addresses, or other AWS services, but not directly to WAF ARN.
Option B: CloudFront doesn't "forward" requests to AWS WAF. Instead, AWS WAF is integrated with CloudFront as a web ACL that inspects requests before they're processed by CloudFront. The traffic flow is: Client → AWS WAF (web ACL) → CloudFront → Origin.
Option C: Security groups are for EC2 instances and VPC resources, not for S3 buckets. S3 uses bucket policies, not security groups. While associating WAF with CloudFront is correct, the security group approach for S3 is invalid.
Key AWS Services Integration:
This architecture ensures that: