Lab 05 - Website Access III
Difficulty: Beginner Service: Amazon S3
Scenario
Your team hosts a static website in S3. A colleague set it up and the stack deployed without errors — but every request to the site returns 403 Access Denied.
What Was Deployed
| Resource | Purpose |
|---|---|
AWS::S3::Bucket |
S3 bucket that hosts the site |
AWS::S3::BucketPolicy |
Bucket policy for the site |
The stack deployed without errors.
Deploy the Lab
- Open the AWS CloudFormation console
- Click Create stack > With new resources (standard)
- Select Upload a template file and upload lab-05-website-access-iii.yaml
- Enter a stack name (e.g.,
brokenlabs-lab-05) and click Next > Next > Submit - Wait for the stack status to reach CREATE_COMPLETE
- Open the stack Outputs tab — you will see
BucketNameandBucketURL
The Problem
Open the BucketURL from the stack Outputs in your browser.
Expected: the page displays the AWS Broken Labs welcome page. Actual: the browser returns an XML error:
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>EEN63HXBJD24G08R</RequestId>
<HostId>
ZW2Wpr64vuzJ+qbQAAwHhKHVzSzDp39z6q8u4wfzfNjxJPkse0Q2bSH9AiYQPYtmw2cIosmLDTGkY+41XAPNZ10UvZfoOeNl
</HostId>
</Error>
Fix the Lab
Diagnose why the problem occurs and fix it so the result matches Expected above.
Need help? Open hints for progressive hints.
Cleanup
- Open CloudFormation, select your stack, and click Delete