Skip to content

App that will cleanup old Elastic Beanstalk application version

License

Notifications You must be signed in to change notification settings

johan-smits/beanstalk-cleaner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

beanstalk-cleaner

Cleans up Application Versions that are not being used by any environment.

Purpose

Elastic Beanstalk has service limits which will prevent you from deploying if you have more than 500 versions in your account. This application is meant to be run as a job that periotically cleans up old versions that are not being used by any environment.

Setup

This application looks for 3 environment variables in order to access your AWS account:

AWS_ACCESS_KEY_ID=myID
AWS_SECRET_ACCESS_KEY=mySecret
AWS_DEFAULT_REGION=us-east-1

You can set the age of applications that you want to keep in case of a rollback with:

AGE_DAYS=7

Running

You can run this application two ways. You can clone the repository and run

bundle exec ruby cleaner.rb

Or you can run it using docker by running

docker run --rm -it \
  -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
  -e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION \
  zabawaba99/beanstalk-cleaner

About

App that will cleanup old Elastic Beanstalk application version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%