Assignment 3: AWS Storage Architectures
Hands-On S3, EBS, and EFS
Overview
This assignment provides hands-on experience with AWS storage services and data protection
patterns. You will publish a static website with Amazon S3, build a file upload workflow on EC2
backed by EBS, and mount a shared filesystem via EFS across instances. You will also answer
reflection questions that connect your results to real-world design choices.
Deliverables
Each student (or group) must submit the following:
1. Presentation Slides (10–14 slides maximum)
o Title slide with student name(s), course, and assignment title.
o Clear explanation of each completed task:
▪ Task 1 – Static Website on Amazon S3
▪ Task 2 – EC2 Upload App with EBS Persistence
▪ Task 3 – Shared Storage with EFS
▪ Task 4 – Reflection questions
o Screenshots or videos of key steps/results (e.g., S3 website endpoint, df -h with
mounts, lifecycle rule screenshot).
o Reflection question responses (may be included as slides or an appendix).
o Lessons learned and challenges encountered.
2. Demonstration (in-class or recorded)
o A 6–9 minute walkthrough of the slides and discussion of your results.
o Optional short demo (if possible) showing:
▪ Accessing the static website hosted on Amazon S3 via its public endpoint.
▪ Uploading a file through the EC2 web interface and verifying it is stored in the
attached EBS/EFS volume.
Presentation Guidelines
• Use professional formatting (legible fonts, consistent colors, organized layout).
• Ensure clarity: avoid overcrowding slides with text; use bullet points and visuals.
• Provide screenshots or videos as evidence of work completed.
• Keep presentations within the time limit (6–9 minutes).
• Be prepared to answer questions about the process and challenges.
Detailed Grading Rubric (100 points total)
All team members are required to contribute to the presentation. The final score will be
proportionally adjusted based on the number of members who actually present. For example, if a
group consists of five students but only four deliver the presentation, and the maximum score is 100
points, the adjusted score will be calculated as:
4
𝐴𝑑𝑗𝑢𝑠𝑡𝑒𝑑 𝑆𝑐𝑜𝑟𝑒 = ( ) × 100 = 80
5
1. Task Completion (60 points total)
Each AWS task is evaluated based on correctness, completeness, and evidence (e.g.,
screenshots/videos output).
• Task 1 – S3 Static Website (15 pts)
o Bucket created, public access policy and static hosting configured correctly (8 pts)
o Website endpoint loads successfully with your content (7pts)
• Task 2 – EC2 + EBS Uploads (20 pts)
o EBS volume created, attached, formatted, and mounted (10 pts)
o Upload app works and files persist on EBS (10 pts)
• Task 3 – EFS (Shared Storage) (15 pts)
o EFS created and mounted on two instances (8 pts)
o Cross-instance visibility of files verified (7 pts)
• Task 4 – Reflection Questions (10 pts)
o Complete and thoughtful answers for all questions (10 pts – 5 for each)
2. Presentation Quality (30 points total)
• Clear structure (intro, results, discussion, conclusion) (10 pts)
• Slides visually organized and professional, for example, adding pictures, transitions,
animations (10 pts)
• Screenshots or videos included as evidence (5 pts)
• Proper timing (within 6–9 min) (5 pts)
3. Professionalism & Delivery (10 points total)
• Confident and clear presentation delivery (4 pts)
• Ability to answer questions from peers/instructor (4 pts)
• Team collaboration and equal participation (2 pts)
Submission Instructions
• Submit slides (PowerPoint or PDF) to Moodle by the deadline.
• Each group will present during the next class session.
Task 1: Hosting a Static Website with Amazon S3
Amazon S3 can serve a complete static website without requiring a web server. This task guides you
through the process of setting up and hosting a simple HTML page.
Instructions:
1. Create an S3 Bucket
o Sign in to the AWS Management Console.
o Navigate to Amazon S3.
o Click Create bucket.
o Enter a unique bucket name (e.g., my-static-website-bucket).
o Choose a region close to you.
o Uncheck “Block all public access” (since a public website requires access).
o Acknowledge the warning and click Create bucket.
2. Upload Website Files
o Open the bucket you just created.
o Click Upload → Add files.
o Upload the provided [Link] and [Link] in task_1 folder
o Confirm and complete the upload.
3. Configure Static Website Hosting
o In the bucket, go to the Properties tab.
o Scroll to Static website hosting.
o Select Enable.
o Choose Host a static website.
o For Index document, enter [Link].
o Save changes.
4. Set Bucket Policy for Public Access
o Go to the Permissions tab.
o Under Bucket Policy, add a policy that allows public read access to your objects:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s[Link]my-static-website-bucket/*"
}
]
}
o Replace my-static-website-bucket with your bucket name.
o Save changes.
5. Test the Website
o In the Properties tab, under Static website hosting, copy the Endpoint URL.
o Paste it into your browser to see your hosted [Link] styled with [Link].
6. Remember to delete the S3 bucket after you have done to avoid unnecessary costs.
Task 2: File Uploads to an EC2 Instance with EBS
In this task, you will create a simple web application on an EC2 instance that allows users to upload
files. The files will be saved to an attached EBS volume, demonstrating persistent, block-level storage.
Instructions:
1. Launch an EC2 Instance
o Sign in to the AWS Management Console.
o Go to EC2 → Launch Instance.
o Select Amazon Linux AMI (or Ubuntu, if preferred).
o Choose a free-tier instance type (e.g., [Link]).
o Configure Security Group to allow:
▪ HTTP (port 80)
▪ SSH (port 22)
o Launch the instance and download the key pair.
2. Attach and Mount an EBS Volume
o In the EC2 dashboard, select Elastic Block Store in the same as your EC2 instance and
create a volume by selecting “Create volume” in the same region and availability zone
as your EC2 instance.
o Put the setting to minimum to avoid excessive charge.
o Attach the EBS volume to the instance and select device name (e.g. /dev/sdb)
o Connect with AWS dashboard or SSH into the EC2 instance.
o Format the volume (replace sdb with your volume name):
sudo mkfs -t ext4 /dev/sdb
o Mount the volume:
sudo mkdir /ebs-storage
sudo mount /dev/sdb /ebs-storage
o Add an entry to /etc/fstab for persistence:
echo "/dev/sdb /ebs-storage ext4 defaults,nofail 0 2" | sudo tee -a
/etc/fstab
This command adds a line to the /etc/fstab file, which is used to define what filesystems
to mount at boot. Feel free to look up online to see what it does.
3. Install NGINX and PHP
o Update and install required packages:
sudo yum update -y
sudo yum install -y nginx php php-fpm
o Enable and start services:
sudo systemctl enable nginx php-fpm
sudo systemctl start nginx php-fpm
o Give PHP-FPM access to the EBS storage directory
sudo chown -R apache:apache /ebs-storage
4. Add NGINX Alias for /ebs-storage
o Open your NGINX config:
sudo nano /etc/nginx/[Link]
o Inside the server { ... } block, add this:
location /ebs-storage/ {
alias /ebs-storage/;
autoindex on;
}
alias tells NGINX: when a browser requests /ebs-storage/..., serve files from
▪
the real /ebs-storage/... path.
▪ autoindex on; (optional) lets you browse files via the URL.
5. Upload Your Web Application Files
o On your local machine, prepare three files in folder task_2:
▪ [Link] → webpage interface (upload form and file list).
▪ [Link] → CSS styling for the interface.
▪ [Link] → handles the file upload logic.
o Use SCP (secure copy) to upload them into the temporal location:
scp -i <[Link]> [Link] ec2-user@<Public-IP>:/home/ec2-user/
scp -i <[Link]> [Link] ec2-user@<Public-IP>:/home/ec2-user/
scp -i <[Link]> [Link] ec2-user@<Public-IP>:/home/ec2-user/
▪ Replace <[Link]> with the Key Pair used when you launched your EC2
instance
▪ Replace <Public-IP> with the public IP address of your EC2 instance
o Inside your EC2 instance, copy the temp files to the NGINX web root.
cd /home/ec2-user/
cp [Link] /usr/share/nginx/html/
cp [Link] /usr/share/nginx/html/
cp [Link] /usr/share/nginx/html/
6. Test the Application
o Restart NGINX
sudo systemctl restart nginx
oOpen a browser and enter your EC2 Public IPv4 address.
oYou should see the styled webpage with an upload form and a list of files stored in
your EBS volume.
o Upload a file → it should be saved in /ebs-storage and displayed in the file list.
7. Remember to delete the EBS and EC2 instance after you have done to avoid
unnecessary costs.
Task 3: Shared Storage with Elastic File System (EFS)
This task demonstrates how EFS provides a scalable, shared file system that can be mounted by
multiple EC2 instances simultaneously, enabling collaborative applications.
Instructions:
1. Create an EFS File System
o Sign in to the AWS Management Console and navigate to EFS.
o Click Create file system.
o Choose a VPC and a region where your EC2 instances are located
2. Configure Security Groups
o Sign in to the AWS Management Console and navigate to EC2.
o Create security group.
o Add an inbound rule:
▪ Type: NFS
▪ Port Range: 2049
▪ Source: [Link]/0 for simplicity (but you can set the same security group for
extra layer of security).
o Then add a temporary inbound rule for SSH connection everywhere for
configuration.
o Save the rule.
3. Save the rule.
o Go to EC2 → Launch Instance.
o Select Amazon Linux 2 AMI (or Ubuntu).
o Choose [Link].
o Assign both instances to the same VPC and Subnet where your EFS exists.
o Use the same security group configured above.
o Launch both instances and download the key pair (.pem key is preferred) if not
already available.
4. Set the EFS’s Network to the security group configured above.
o Navigate to EFS.
o Select your newly created EFS.
o Go to the Network tab and click manage
o Change the security group of EC2 instances’ availability zone to the same configured
above.
5. Mount the EFS File System on Both EC2 Instances
o SSH into both EC2 instances.
o First, install the necessary NFS client and EFS utilities. For Amazon Linux, run the
following:
sudo yum update -y # Amazon Linux
sudo yum install -y amazon-efs-utils nfs-utils
(For Ubuntu: sudo apt update && sudo apt install -y amazon-efs-utils nfs-common)
6. Mount the EFS File System
o Go to Amazon EFS → File Systems → select your file system.
o Click Attach.
o Copy the mount command provided (using amazon-efs-utils). It looks like this:
sudo mkdir /efs
sudo mount -t efs -o tls fs-xxxxxx:/ /efs
o Run this command on both EC2 instances.
o To make the mount persistent across reboots, add this entry to /etc/fstab:
echo "fs-xxxxxx:/ /efs efs defaults,_netdev 0 0" | sudo tee -a /etc/fstab
7. Test File Sharing
o On EC2 Instance 1, create a file in the EFS mount:
echo "Hello from Instance 1" | sudo tee /efs/[Link]
o On EC2 Instance 2, check for the file:
cat /efs/[Link]
o You should see the message:
Hello from Instance 1
8. Remember to delete the EFS and EC2 instances after you have done to avoid
unnecessary costs.
This video demonstrates how to set up an EFS file system and connect it to multiple EC2 instances.
EFS share between two EC2 instances
Task 4: Answer reflection questions
Answer the following question:
- EBS vs. EFS - Based on your results, explain key differences and appropriate use cases.
Then, pick one from these questions to answer:
- Explain how Amazon S3 Glacier helps reduce storage costs and describe a scenario where it
would be the most suitable storage class to use.
- What are the main types of AWS Storage Gateway, and how does each type help integrate on-
premises applications with AWS cloud storage?
- How does AWS Migration Hub simplify the process of tracking and managing application
migrations to AWS?
- What protocols does AWS Transfer Family support, and how does it enable secure and
seamless transfer of files into Amazon S3 or Amazon EFS?
- Compare the use cases of AWS Snowcone, Snowball, and Snowmobile. When would you
choose each device?
- Describe how AWS DataSync automates and accelerates data transfer between on-premises
storage and AWS. What advantages does it offer over manual or traditional transfer methods?