0% found this document useful (0 votes)
6 views2 pages

Basic Lab 2 Guide

This tutorial provides a step-by-step guide for hosting a static website on AWS S3, including creating an S3 bucket, uploading website files, configuring static website hosting, setting permissions for public access, and testing the website. Users are instructed to enable public access and set a bucket policy to allow public reads. The document emphasizes verifying settings and testing the website to ensure proper functionality.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Basic Lab 2 Guide

This tutorial provides a step-by-step guide for hosting a static website on AWS S3, including creating an S3 bucket, uploading website files, configuring static website hosting, setting permissions for public access, and testing the website. Users are instructed to enable public access and set a bucket policy to allow public reads. The document emphasizes verifying settings and testing the website to ensure proper functionality.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AWS Lab Tutorial

Hosting a Static Website on AWS S3

This tutorial guides you through deploying a simple static website on Amazon S3, testing it, and
understanding the expected output.

Step 1: Create an S3 Bucket

1. Navigate to the S3 service.


2. Click Create bucket.
3. Enter a unique bucket name.
4. Uncheck Block all public access to allow public reads.
5. Leave other settings as default and click Create bucket. Your bucket is now ready to
store website files.

Step 2: Upload Website Files

1. In the S3 console, select your new bucket.


2. Click Upload.
3. Add your files: At minimum, upload an [Link] file (e.g., with basic HTML content like
Hello, World!).
4. Ensure files are uploaded successfully, check the bucket's Objects tab.

Step 3: Configure Static Website Hosting

1. In the bucket's Properties tab, scroll to Static website hosting.


2. Click Edit, then select Enable.
3. Set Hosting type to Host a static website.
4. Enter [Link] as the Index document.
5. Click Save changes.
6. Note the Bucket website endpoint (e.g., [Link] south-
[Link]). This is your site's URL.
Step 4: Set Permissions for Public Access

1. In the bucket's Permissions tab, scroll to Bucket policy.


2. Click Edit and paste this policy (replace your-bucket-name):

"Version": "2012-10-17",

"Statement": [

"Sid": "PublicReadGetObject",

"Effect": "Allow",

"Principal": "*",

"Action": "s3:GetObject",

"Resource": "arn:aws:s3:::your-bucket-name/*"

3. Click Save changes. This allows public read access to objects.

If you encounter access issues, double-check that public access blocks are disabled in the
Permissions tab.

Step 5: Test the Website

1. Open a web browser and navigate to your bucket's endpoint (from Step 3).
2. If everything is set up correctly, your [Link] content should load.
3. Test navigation: If you have links or additional pages, click through them.
4. Check for issues: If you see an access denied error, verify the bucket policy and public
access settings.

You might also like