I want to shut down the app servers while I upgrade the database.
Is there a way to pause or stop the app servers without terminating/destroying the environment?
Can I just go to the Elastic Beanstalk load balancer and change that temporarily without any issues or consequences to the Elastic Beanstalk configurations or the way it manages its servers?
On the Automatic scaling tab, under Dynamic scaling policies, select the check box in the top right corner of the desired scaling policy. Scroll to the top of the Dynamic scaling policies section, and choose Actions, Disable.
In AWS Elastic Beanstalk, you can create a load-balanced, scalable environment or a single-instance environment. The type of environment that you require depends on the application that you deploy.
Elastic Beanstalk creates an application version whenever you upload source code. This usually occurs when you create an environment or upload and deploy code using the environment management console or EB CLI.
This is the only method that worked for me.
1) Go to the environment you want to pause on AWS Management Console
2) Select "Configuration"
3) Open "Capacity"
4) Scroll all the way down to "Time-based Scaling"
5) Click the "Add schedule action" button
6) Set the action to few minutes in the future (recommended: 5 minutes so environment has time to reset), give it a name (for example "terminate") and set minimum and maximum instances to '0':
Note that times are set in UTC. You can use time.is/UTC to determine the current UTC.
This would create an error that would shut down your environment so you won't have to pay for it. Any other methods suggested just create a error at time of applying so it doesn't pass through and environment would still work.
To re-enable the environment, just schedule another action with instance min 1 and max 4 for example (those are the defaults).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With