Skip to content

This Bash script identifies and optionally deletes unlinked AWS snapshots, with a "dry run" mode for listing snapshots and a "delete mode" for removing them.

Notifications You must be signed in to change notification settings

arnaud-coral/AWS-Delete-unused-EBS-snapshots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🚀 Delete unused AWS AMI Snapshots

Automate the process of listing or deleting AWS EC2 snapshots that aren't linked to any available or pending AMI.

📝 Table of Contents

🧰 Prerequisites

  • An AWS Account
  • AWS CLI configured with necessary permissions
  • Bash environment for executing the script

💾 Installation

  1. Clone this repository or download the script.
git clone https://github.com/arnaud-coral/AWS-Delete-unused-EBS-snapshots
  1. Navigate to the directory.
cd [directory-name]
  1. Make the script executable.
chmod +x delete_unused_snapshots.sh

🚴 Usage

  1. For dry run mode (lists snapshots without deleting):
./delete_unused_snapshots.sh -d
  1. For delete mode (deletes the unlinked snapshots):
./delete_unused_snapshots.sh

📜 License

This script is © 2023 by Arnaud Coral. It's licensed under CC BY-NC-SA 4.0. Please refer to the license for permissions and restrictions.

About

This Bash script identifies and optionally deletes unlinked AWS snapshots, with a "dry run" mode for listing snapshots and a "delete mode" for removing them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages