Complete AWS EC2 Deployment Guide For Beginners

Learn how to deploy websites on AWS EC2 servers using Ubuntu, NGINX, SSL, GitHub and production-ready cloud deployment workflows.

AWS EC2 Linux DevOps

What Is AWS EC2?

AWS EC2 stands for Elastic Compute Cloud. It allows developers and businesses to launch scalable cloud servers.

EC2 servers are used for:

  • Website Hosting
  • Application Deployment
  • DevOps Infrastructure
  • Cloud Computing
  • Docker & Kubernetes
Important: AWS EC2 is one of the most important cloud technologies for DevOps Engineers.

Step 1 — Launch EC2 Instance

First, create an AWS account and launch an Ubuntu EC2 instance.

EC2 Setup Steps

  • Open AWS Console
  • Search EC2
  • Launch Instance
  • Select Ubuntu
  • Choose t2.micro
  • Configure Security Group
  • Allow Ports 22, 80, 443
Port 22 → SSH

Port 80 → HTTP

Port 443 → HTTPS

Step 2 — Connect Using SSH

After launching the server, connect using SSH.

ssh -i key.pem ubuntu@your-server-ip

Once connected, update the server packages.

sudo apt update

sudo apt upgrade -y
Tip: Keep your Linux server updated for better security and performance.

Step 3 — Install NGINX Server

NGINX is a high-performance web server used for hosting websites, reverse proxy and load balancing.

Install NGINX using:

sudo apt install nginx -y

Start and enable NGINX:

sudo systemctl start nginx

sudo systemctl enable nginx

Verify NGINX status:

systemctl status nginx
Important: Open your server IP in browser to verify NGINX installation.

Step 4 — Deploy Your Website

Upload your website files to the server.

NGINX default directory:

/var/www/html

Remove default files:

sudo rm -rf /var/www/html/*

Clone your GitHub repository:

git clone https://github.com/username/project.git

Move files:

sudo cp -r project/* /var/www/html/

Restart NGINX:

sudo systemctl restart nginx

Your website should now be live using server public IP.

Step 5 — Connect Domain Name

Connect your custom domain with AWS EC2 server.

Domain Setup Process

  • Buy domain from provider
  • Open DNS settings
  • Create A Record
  • Point domain to EC2 IP
Type: A

Host: @

Value: YOUR_SERVER_IP

Wait for DNS propagation which may take some time.

Step 6 — Install SSL Certificate

SSL secures your website using HTTPS.

Install Certbot:

sudo apt install certbot python3-certbot-nginx -y

Generate SSL:

sudo certbot --nginx

SSL improves:

  • Website Security
  • SEO Rankings
  • User Trust
  • Browser Security
Important: Google prefers HTTPS websites for SEO rankings.

Final AWS Deployment Architecture

AWS EC2
Ubuntu Linux
NGINX Server
GitHub Repository
Domain Setup
SSL Security
Production Deployment

AWS EC2 deployment is one of the most important DevOps skills in 2026.

Practice deployments regularly to improve cloud engineering, Linux and DevOps knowledge.

Need AWS Deployment Services?

BuildDeploy Tech provides AWS cloud deployment, DevOps automation, Linux server management, Docker setup and scalable cloud infrastructure solutions.

Need AWS, DevOps Or Cloud Deployment Services?

BuildDeploy Tech helps startups, businesses and enterprises deploy scalable cloud infrastructure, Linux servers, Docker containers, CI/CD pipelines and AWS production applications.