Skip to content

Bash Script to make AMI backup from EC2 instance with retention and delete old AMI if these doesn't be in use without downtime.

License

Notifications You must be signed in to change notification settings

isaac88/aws-ec2-ami-backup-retention

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

aws-ec2-ami-backup-retention

Bash Script to make AMI backup from EC2 instance with retention and delete old AMI if these doesn't be in use without downtime.

Requirements

  1. You need install AWS Cli at your system.
  2. Configured AWS Cli. http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html .
  3. Script : aws-ec2-ami-backup-retention.sh with execute permissions.

Bash Script vairables | Input Parameters

  1. EC2_NAME: You can find your instance name at AWS Manage Console.
  2. RETENTION_DAYS: If you want to keep X days AMI backups.
  3. PROFILE: Your aws cli profile.

Usage and Examples

./aws-ec2-ami-backup-retention.sh instance-name 3 default

About

Bash Script to make AMI backup from EC2 instance with retention and delete old AMI if these doesn't be in use without downtime.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages