- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
Create a Static Website Using Amazon S3
In this lab, you’ll build a simple static website and host it using Amazon S3. You’ll create an S3 bucket, upload the site content, configure static website hosting and public access, and then confirm that both the main page and the custom error page load correctly in your browser.
Lab Info
Table of Contents
-
Challenge
Create the Amazon S3 infrastructure for a static website
- Create a new Amazon S3 bucket to store the website files.
- Choose a unique bucket name and appropriate AWS Region for the lab environment.
- Download the provided index.html and error.html files from the GitHub repository.
- Upload both HTML files into the newly created S3 bucket.
- Verify that index.html and error.html appear in the bucket’s object list.
-
Challenge
Configure Amazon S3 for static website hosting and public access
- Adjust the bucket’s Block Public Access settings to allow public reads for the website content.
- Add or update a bucket policy that grants public read access to the website objects.
- Enable static website hosting on the S3 bucket.
- Configure index.html as the index document and error.html as the error document in the static website hosting settings.
-
Challenge
Validate the hosted website and custom error behavior
- Adjust bucket public access settings and bucket policy so that the website files are publicly readable.
- Open the endpoint URL in a web browser and confirm that index.html is served successfully.
- Navigate to an invalid or non-existent path to verify that the configured error.html page is returned.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.