Skip to content

Nishika10/AutoEC2-Web-Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☁️ AutoEC2WebDeployment

Automating website deployment on AWS EC2 using a simple Bash script.
This project sets up an Apache web server, copies your website file (index.html), and makes it accessible via the EC2 Public IPv4 address — all with a single command.

📝Introduction

Deploying a website on AWS EC2 often requires multiple manual steps like updating the system, installing a web server, configuring permissions, and starting services.
This project simplifies the process by using a single Bash script (deploy.sh) that automates everything.
It is designed for beginners and developers who want a quick way to host a static website on an EC2 instance without worrying about complex configurations.

🚀 Features

  • One-command automated deployment on AWS EC2
  • Installs and configures Apache web server automatically
  • Copies your index.html file to the server’s web root
  • Makes your website accessible using the EC2 Public IPv4 address
  • Beginner-friendly and lightweight project

🛠️ Tech Stack

  • Amazon EC2 → For hosting the website on the cloud.
  • Apache HTTP Server → As the web server to serve the HTML file.
  • Bash Script → For automating the deployment process.

⚙️ Installation / Run Locally

Follow these steps to set up and run the project on your EC2 instance:

  1. Launch an EC2 instance

    • Use Amazon Linux 2.
    • Allow inbound rules for HTTP (port 80) and SSH (port 22).
  2. Connect to your EC2 instance

    ssh -i your-key.pem ec2-user@your-ec2-public-ip
    
  3. Clone this repository

     git clone https://github.com/Nishika10/AutoEC2-Web-Deployment.git
     cd AutoEC2-Web-Deployment
    
  4. Place your website file

  • Replace the provided index.html with your own HTML file (keep the same name).
  1. Run the deployment script
     chmod +x deploy.sh
     ./deploy.sh
  2. View your website

💻 Usage / Examples

  1. Connect to your EC2 instance via SSH.
  2. Clone this repository and place your index.html file in the project folder.
  3. Run the deployment script:
    ./deploy.sh
  4. Once the script finishes, open your EC2 Public IPv4 address in the browser:

🌐 Deployment

This project is deployed on:

  • AWS EC2 (Amazon Linux 2)
  • Apache Web Server for serving static content
  • Bash Script (deploy.sh) to automate the entire process

With a single command, the script installs Apache, configures it, copies your website file (index.html), and makes the site accessible using your EC2 Public IPv4 address.

🖼️ Screenshots

Here’s an example of the deployed website:

Deployed Website Screenshot

📝 Lessons Learned

  • Gained hands-on experience with AWS EC2 and deploying a website on the cloud.
  • Learned how to automate server setup using Bash scripting.
  • Understood the importance of Apache configuration for hosting static websites.
  • Improved knowledge of cloud infrastructure automation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

👩‍💻 Author

Nishika Jaiswal

Aspiring Cloud & DevOps Engineer

About

A lightweight Bash automation script to deploy static websites on AWS EC2 in seconds.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors