Deploying a Web Application on AWS EC2: From Localhost to Public Access (Day 3)

Published: (February 28, 2026 at 11:25 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

🚀 The Objective

Deploy a static web application on a cloud‑based Linux server and make it accessible over the internet.
No managed platforms. No deployment shortcuts. Just core infrastructure.

🏗 Step 1: Provisioning the Cloud Server

  • Launched a t3.micro Linux instance.
  • Configured:
    • Key Pair for secure SSH access
    • Security Group allowing HTTP (Port 80)
    • Default EBS storage

The instance was running in the Mumbai region, ready to host the application.

🔐 Step 2: Secure Remote Access

Connected to the instance via SSH using key‑based authentication.
This marked the shift from localhost to a remote server.

⚙ Step 3: Installing and Configuring Nginx

  1. Installed Nginx.
  2. Verified the service was running.
  3. Removed the default Nginx welcome page.
  4. Copied application files into /var/www/html/.
  5. Restarted the Nginx service.

Opened the public IP in a browser and confirmed the site loaded successfully.

🌍 The First Real Test – Laptop Browser

Result: Application running via EC2 public IP in a desktop browser.

Screenshot placeholder: “Application deployed on EC2 and accessible publicly via Public IP address.”

📱 The Real Validation – Mobile Access

To ensure the site wasn’t dependent on the laptop:

  1. Disconnected the laptop.
  2. Switched to mobile internet.
  3. Entered the public IP in the phone’s browser.

The site loaded instantly.

Screenshot placeholder: “Application accessible globally via mobile browser — independent of local system.”

🧠 Key Technical Takeaways

  • Difference between localhost and a public IP.
  • Security Groups act as firewalls.
  • Opening Port 80 is necessary for HTTP traffic.
  • Nginx serves static content.
  • Understanding instance lifecycle and cost awareness.
  • Importance of an Elastic IP for production stability.
  • Shift in mindset from pure application logic to infrastructure thinking.

💰 Cost Awareness

Using a t3.micro under the AWS Free Tier:

  • 750 hours per month available.
  • Suitable for continuous hands‑on learning.
  • Encourages cost‑conscious cloud usage.

🎯 Reflection

Transitioning from developer to cloud engineer felt like a milestone. Writing code is powerful, but deploying that code to a live cloud server—configuring compute, networking, and services—provides a completely different level of understanding. This was more than just hosting a webpage; it was building a small, real‑world infrastructure setup from scratch.

And this is only Day 3. On to the next challenge 🚀

0 views
Back to Blog

Related posts

Read more »

Google Gemini Writing Challenge

What I Built - Where Gemini fit in - Used Gemini’s multimodal capabilities to let users upload screenshots of notes, diagrams, or code snippets. - Gemini gener...