0% found this document useful (0 votes)
15 views5 pages

Exp 3 - CCS

In this lab, I created a static website using Amazon S3 and implemented a bucket policy for data protection. I restricted access to the website based on specific IP address ranges and automated object uploads using the AWS SDK for Python (Boto3). The website is configured with index and error pages, ensuring secure access management.

Uploaded by

zaid.211413.it
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)
15 views5 pages

Exp 3 - CCS

In this lab, I created a static website using Amazon S3 and implemented a bucket policy for data protection. I restricted access to the website based on specific IP address ranges and automated object uploads using the AWS SDK for Python (Boto3). The website is configured with index and error pages, ensuring secure access management.

Uploaded by

zaid.211413.it
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
You are on page 1/ 5

Exp 3: WORKING WITH AMAZON S3

Name: Zaid Abbas Kazmi Roll No: 211413


Batch : A
Lab Overview and Objectives

In this lab, I used Amazon Simple Storage Service (Amazon S3) to host a static website and
implemented architectural best practices to protect and manage data.

Objectives:

• Create a static website using Amazon S3

• Apply a bucket policy on an S3 bucket to configure customized data protection

• Upload objects to an S3 bucket using the AWS SDK for Python (Boto3)

• Configure the website hosted on Amazon S3 to be accessible only from a specific IP address
range, and test the configuration

Step 1: Sign in to the AWS Management Console


I signed in to my AWS account and navigated to the Amazon S3 service from the AWS Management
Console.

Step 2: Create an S3 Bucket


I created a new S3 bucket with a unique name to host my static website. I ensured the bucket was
created in my preferred AWS Region.
Step 3: Configure the Bucket for Static Website Hosting
I navigated to the Properties tab of my bucket and enabled static website hosting. I set index.html as
my index document and error.html as my error document.

Step 4: Create and Upload Website Files


I created basic HTML files for my website (index.html and error.html) and uploaded them to my S3
bucket.
Step 5: Create and Apply a Bucket Policy
I created a bucket policy that grants public read access to my bucket contents, allowing visitors to
view the website. The policy was configured through the bucket's Permissions tab.

Step 7: Configure IP-Based Access Restrictions


I modified my bucket policy to restrict access to my website from specific IP address ranges only. This
was done by adding conditions to the bucket policy.
Step 8: Install and Configure AWS SDK for Python (Boto3)
I installed Boto3 on my local machine and set up AWS credentials to enable programmatic access to
my S3 bucket.

Step 9: Write and Execute Python Script to Upload Objects


I created a Python script using Boto3 to programmatically upload objects to my S3 bucket. The script
allowed me to easily manage and update the website content.
Step 10: Test Website Accessibility
I tested my website's URL from both allowed and restricted IP addresses to verify that my IP
restriction policy was working correctly.

Lab Summary

In this lab, I successfully created a static website hosted on Amazon S3. I applied security best
practices by configuring a bucket policy that restricted access to specific IP ranges. Additionally, I
learned how to automate object uploads using the AWS SDK for Python (Boto3).

The website is now properly configured with index and error pages, and access is controlled
according to the specified IP address ranges.

You might also like