How to stop elastic beanstalk without terminating

amazon-web-serviceselastic-beanstalk

Is there any way to stop an elastic beanstalk environment as opposed to terminating it? There are times during testing that I would prefer to stop the environment so that I'm not being charged. However, I'm not seeing a way to do this via the GUI. It is very inconvenient to have to terminate and re-create my environment.

enter image description here

Best Answer

Currently, there's no easy way to suspend an environment. There's also no easy way to have a maintenance page for your environment while your instances are down.

When you set the number of instances to 0, the instances will terminate but you'll have to do this all manually as the EB console does not allow an entry of 0. You can do this by running this:

as-update-auto-scaling-group YourAutoScalingGroupID --min-size 0 --max-size 0 --desired-capacity 0

This, however, only terminates your instances. Everything else is still running, like your ELB. You can then change it back to your previous settings when you're done.