Skip to content

Nishika10/Cloud_Cleaner_Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☁️ Cloud Cleaner Bot

A lightweight shell script that automates the cleanup of AWS resources such as stopped EC2 instances, unattached EBS volumes, EBS snapshots, and unassociated Elastic IPs — helping reduce costs and maintain a clean cloud environment.

🚀 Features

  • Deletes unattached EBS volumes to free up space.
  • Releases unused Elastic IPs to avoid unnecessary charges.
  • Identifies stopped EC2 instances to help optimize resource usage.
  • Cleans up EBS snapshots to reduce storage costs.
  • Automates cleanup operations via a bash script using the AWS CLI.

💻 Tech Stack

  • Bash/Shell Scripting
  • AWS CLI

🌐 AWS Services Used

  • EC2, IAM, Elastic IP, EBS (Volumes and Snapshots)

🛠️ Installation

  1. Make sure you have AWS CLI installed and configured:
    aws configure
    
  2. Clone the Repository:
     git clone https://github.com/Nishika10/Cloud_Cleaner_Bot.git
     cd Cloud_Cleaner_Bot
    
  3. Give execution permission to the script:
    chmod +x Cloud_Cleaner_Bot.sh
    
     

📦 Usage

  1. Run the script using the command:
    ./Cloud_Cleaner_Bot.sh
    

The script will:

  • List and delete unattached EBS volumes.
  • Release any unused Elastic IPs.
  • Show stopped EC2 instances and ask if you want to delete them.
  • List available EBS snapshots and ask if you want to delete them.

⚠️ Make sure your IAM user has sufficient permissions to perform these actions.

📚 Lessons Learned

  • Learned how to interact with AWS resources using AWS CLI.

  • Gained hands-on experience in writing automated bash scripts.

  • Understood cost optimization practices in real AWS environments.

  • Explored how to make scripts safer with user prompts and validations.

⚖️ 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 shell script to clean up stopped EC2, unused EBS, and Elastic IPs using AWS CLI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages