You need to host a static web app on Amazon S3, but company policy forbids making any S3 buckets public. You have uploaded the static files to the S3 bucket. Which approach satisfies the requirement to serve the site without making the bucket public?
Choose an answer
Tap an option to check your answer.
Correct answer: Deploy an Amazon CloudFront distribution. Configure the S3 bucket as a distribution origin and use an origin access identity (OAI). Grant the OAI s3:GetObject permission in the bucket policy..
Why this is the answer
This approach is correct because CloudFront with an Origin Access Identity (OAI) allows S3 content to be served publicly through CloudFront without making the S3 bucket itself public. The OAI acts as a virtual user, and you grant it s3:GetObject permissions on the bucket policy, allowing CloudFront to fetch content while direct public access to the S3 bucket is denied. Enabling static website hosting on S3 directly makes the bucket public, which violates the company policy. An Application Load Balancer cannot directly front an S3 bucket for static website hosting; ALBs are designed for EC2 instances or other IP-based targets. AWS Global Accelerator improves performance for geographically dispersed users but doesn't solve the problem of serving private S3 content without making the bucket public; it would still require the S3 bucket to be publicly accessible or fronted by another service like CloudFront.
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