Lab 02 - S3 Bucket Region
Difficulty: Beginner Service: Amazon S3
Scenario
A teammate deployed this stack to host a static web page and sent you the
BucketURL from the CloudFormation Outputs to verify it loads. When you open
the URL they shared, you get an error instead of the page.
What Was Deployed
| Resource | Purpose |
|---|---|
AWS::S3::Bucket |
S3 bucket containing a static index.html |
AWS::S3::BucketPolicy |
Bucket policy granting public s3:GetObject on all objects |
The stack deployed without errors and the bucket is correctly configured.
Deploy the Lab
- Open the AWS CloudFormation console
- Click Create stack > With new resources (standard)
- Select Upload a template file and upload lab-02-bucket-region.yaml
- Enter a stack name (e.g.,
brokenlabs-lab-02) 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
Your teammate sent you this link. Open it in your browser:
Test the link your teammate shared
Expected: the page loads. Actual: the browser displays an XML error:
<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist</Message>
<BucketName>brokenlabs-lab-02-us-east-2-123456789012</BucketName>
<RequestId>N4GCJYNRJ03SDAZY</RequestId>
<HostId>Bm9aWhnp6LJaPKfqnOG88qiannFpigzAJABImgqWnogu7C91kw7V1fLOTfq3OTb0j8TDy6ILdcE=</HostId>
</Error>
Fix the Lab
Investigate why the URL fails and determine the correct URL to use.
Need help? Open hints for progressive hints.
Cleanup
- Open CloudFormation, select your stack, and click Delete