
Building a Single-Page AWS Website: Architecture, Hurdles, and Cost Breakdown
Deploying a web application to the cloud is a core milestone for any student pursuing cloud computing. Moving beyond local development environment to cloud infrastructure requires balancing networking, security configurations, object storage, and compute resources.
"Vibrant Art in the Heart of Las Vegas" is my very first single-page website hosted on Amazon Elastic Compute Cloud (EC2) with static assets delivered via Amazon Simple Storage Service (S3). The objective was to gain practical experience with core AWS services. This required me to create cloud resources, configure security settings, install web server software, and integrate media stored in a separate storage service.
Architecture and Services Used
The solution was built using two primary AWS services:
- Amazon EC2 for hosting the website and running the web server.
- Amazon S3 for storing images and media displayed on the website.
This architecture separates website hosting from content storage, which is a common cloud design pattern. Static assets can be stored in S3 while EC2 handles web requests and page delivery.
Technical Architecture Overview
[Client Browser]
----HTTP Request (Port 80) ----> [EC2 Instance (Apache)] ---> Serves Website Pages
----HTTPS Asset Request -------> [S3 Bucket Storage] --------> Delivers Media Files
Implementation Process
Step 1: Creating the S3 Bucket (art-las-vegas-site)
The first task was creating an S3 bucket to store images for the website gallery. Media files related to Las Vegas art and attractions were uploaded to the bucket. These files would later be referenced by the webpage and displayed to visitors. Proper permissions were configured to allow the website to access the stored images.
Step 2: Launching EC2 (t3.micro)
After creating the storage component, an EC2 instance was launched. The instance served as the virtual server that would host the website. A free-tier eligible instance type was selected to minimize costs while providing enough resources to support a small static website. The instance was successfully provisioned and assigned a public IP address for external access.
Step 3: Configuring Network Security
To allow users to access the website, the EC2 security group required configuration. Inbound rules were created to permit HTTP traffic on port 80. Additional rules allowed SSH access so that the server could be managed remotely through the command line.
Without these security group modifications, external users would not be able to connect to the web server. Understanding the relationship between networking and accessibility was a key part of the deployment process. During initial setup, I encountered connections timeouts because the EC2 Security Group lacked an inbound rule for the HTTP on Port 80. Realizing this, I update the inbound rules to allow Port 80 traffic, which immediately resolved the issue.
Step 4: Installing Apache
Once the instance was accessible, Apache HTTP Server was installed through the Linux terminal. Apache was selected because it is a widely used web server and integrates easily with Linux environments.
After installation, the Apache service was started and verified. Accessing the public IP address through a browser confirmed that the web server was functioning correctly and ready to serve website files.
To configure the web server, I executed
sudo dnf install httpd -y to install Apache, followed by sudo systemctl enable --now httpd to launch the service and set it to start automatically on system reboots.Step 5: Deploying the Website
The website files were uploaded to the server, replacing the default Apache web page. The completed site featured a clean layout promoting art and cultural attractions in Las Vegas.
Cost Considerations
Monitoring AWS billing dashboards, setting budget alarms, and shutting down unused resources are essential practices for controlling cloud expenses. By staying strictly within AWS Free Tier limits (such as using a t3.micro instance and under 5 GB of S3 storage), this deployment incurred $0.00 in costs.
Takeaways
Mistakes often provide the most useful learning opportunities. I learned to verify each component individually, test changes one step at a time, and use process of elimination to identify the root cause. This approach was more effective than repeatedly making changes without understanding why something was failing.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article