Skip to content

22MH1A42G1/AWS-Website-Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

AWS Website Deployment (Using EC2 + Elastic IP + Route 53 + SSL)


Final Architecture:

DESIGN

✅ Website can now be accessed via: https://adityaindana.tech


📽️ Demo Video

🔗 [Watch the AWS Deployment Demo on YouTube]

Watch the video


Step 1: Launch & Configure EC2 Instance

  1. Go to AWS EC2 Console → Launch Instance.

  2. Choose Amazon Linux / Ubuntu.

  3. Select t2.micro (Free Tier eligible).

  4. Configure:

    • Allow HTTP (80), HTTPS (443), and SSH (22) ports.
  5. Launch & download the .pem key pair.

  6. SSH into your EC2 instance:

ssh -i my-key.pem ec2-user@EC2-Public-IP
  1. Install Web Server (for static website):
sudo yum update -y
sudo yum install httpd -y
sudo systemctl start httpd
sudo systemctl enable httpd
  1. Upload your website files to /var/www/html/:
sudo rm -rf /var/www/html/*
sudo cp -r /home/ec2-user/mywebsite/* /var/www/html/

Step 2: Allocate Elastic IP (Static IP)

  1. Go to EC2 > Elastic IPs.
  2. Allocate New Address.
  3. Associate it with your running EC2 instance.
  4. Use this Elastic IP as your public IP for the website.

Step 3: Setup Route 53 (Scalable DNS)

  1. Go to Route 53 → Registered Domains:

    • Purchase a new domain (e.g., adityaindana.tech) OR use an existing one from:

      • get.tech
      • Namecheap
      • Name.com
      • GoDaddy.com
  2. After purchase:

    • Go to Hosted Zones → Create Hosted Zone.
    • Domain Name: adityaindana.tech.
    • Type: Public Hosted Zone.
    • It will auto-create 2 default records (NS & SOA).
  3. Create a Record:

    • Record Name: (leave blank for root domain OR use "www" / "maya" for subdomain)
    • Type: A (IPv4 address)
    • Value: Your Elastic IP (e.g., 3.11.233.223)
    • Routing Policy: Simple.
    • TTL: Default (300 sec).

Step 4: Update Domain Name Servers (If Using 3rd Party Provider)

  1. In Route 53 → Hosted Zone → Copy 4 NS (Name Servers):
ns-123.awsdns-45.net
ns-234.awsdns-67.com
ns-345.awsdns-89.org
ns-456.awsdns-10.co.uk
  1. Go to your Domain Provider (e.g., get.tech, GoDaddy, Namecheap):

    • Select your domain → Manage DNS.
    • Replace their nameservers with the AWS provided ones.
  2. Save & Verify (may take 5-10 mins).


Step 5: SSL Certificate (HTTPS Security)

  1. Go to AWS Certificate Manager (ACM).

  2. Request a Public Certificate:

    • Domain Name: adityaindana.tech and/or *.adityaindana.tech (for subdomains).
  3. Validation: Use DNS Validation (automatically create validation CNAME record via Route 53).

  4. After validation is complete → SSL Certificate is issued.

  5. Attach SSL in:

    • CloudFront (for S3/static)
    • OR Elastic Load Balancer (for EC2/Dynamic)
    • OR Use Certbot on EC2 if no Load Balancer:
sudo amazon-linux-extras install epel -y
sudo yum install certbot python2-certbot-apache -y
sudo certbot --apache

✔ Summary Checklist:

Step Status
EC2 Instance with Webserver
Elastic IP Assigned
Route 53 Domain Setup
DNS NameServers Updated
SSL Certificate (HTTPS) ✅ (if ACM or Certbot configured)

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published