I get the following error when deploying to EB:
ERROR: You cannot have more than 500 Application Versions. Either remove some Application Versions or request a limit increase.
I went manually and deleted some versions. I don't want deploys to fail because of this limit. Is there a way in Elastic Beanstalk to auto-evict unused versions?
A feature was recently added to eb cli (v3.3) to cleanup old versions
https://m.reddit.com/r/aws/comments/340ce0/whats_the_thinking_behind_beanstalks_versioning/
Copying command from reddit link
$ eb labs cleanup-versions --help
usage: eb labs cleanup-versions [options...]
Cleans up old application versions.
optional arguments:
--num-to-leave NUM number of versions to leave DEFAULT=10
--older-than DAYS delete only versions older than x days DEFAULT=60
--force don't prompt for confirmation