本文介绍了暂停 Elastic Beanstalk 应用程序环境?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在升级数据库时关闭应用服务器.

有没有办法在不终止/破坏环境的情况下暂停或停止应用服务器?

我可以直接转到 Elastic Beanstalk 负载均衡器并临时更改它,而不会对 Elastic Beanstalk 配置或其管理服务器的方式产生任何问题或后果吗?

解决方案

这是唯一对我有用的方法.

1) 转到您要在

请注意,时间是以 UTC 时间设置的.您可以使用 time.is/UTC 来确定当前的 UTC.

这会产生一个错误,从而关闭您的环境,因此您无需为此付费.建议的任何其他方法只会在应用时创建一个错误,因此它不会通过并且环境仍然可以工作.

要重新启用环境,只需安排另一个操作,例如实例 min 1 和 max 4(这些是默认值).

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?

解决方案

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':

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).

这篇关于暂停 Elastic Beanstalk 应用程序环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-29 07:32