简体   繁体   English

AWS - EC2停止实例无法正常工作

[英]AWS - EC2 stop instances not working properly

I'm very new on AWS and now I have two EC2 instances. 我是AWS的新手,现在我有两个EC2实例。 In order to avoid waste the free tier plan I'm trying to stop instances when I'm not working with them. 为了避免浪费免费套餐计划,我试图在我不使用它们时停止实例。

This is what my EC2 Management console shows. 这是我的EC2管理控制台显示的内容。 As you can see there are two instances running and two instances terminated. 如您所见,有两个实例正在运行,两个实例已终止。 I did not terminate swipe-dev, I have just stop it. 我没有终止swipe-dev,我刚刚停止它。 But for any reason now is terminated plus new same instance with same source code was started. 但由于任何原因,现在终止了加上具有相同源代码的新相同实例。 Why? 为什么?

What I'm doing wrong? 我做错了什么? I just want stop instances. 我只想要停止实例。

在此输入图像描述

Edit 编辑

I have decide keep just one project so I terminate eb-flask-demo-dev and stop swipe-dev instance. 我决定只保留一个项目,所以我终止eb-flask-demo-dev并停止swipe-dev实例。 After few minutes instace state was stoped and I thought finally everything is fine. 几分钟后,状态停止了,我想最后一切都很好。 But I rejoin to EC2 console and this is what it shows. 但我重新加入EC2控制台,这就是它所展示的内容。 Why swipe-dev is running again? 为什么swipe-dev再次运行? and Why there is another terminated instance? 为什么还有另一个终止的实例? 在此输入图像描述

This is possible if your instance is a member of an Autoscaling group with desired capacity = 1 and set minimum size to 0. To maintain the number of healthy instances, Auto Scaling performs a periodic health check on running instances within an Auto Scaling group. 如果您的实例是具有所需容量= 1且将最小大小设置为0的Autoscaling组的成员,则可以执行此操作。为了维护正常实例的数量,Auto Scaling会对Auto Scaling组中正在运行的实例执行定期运行状况检查。 When it finds that an instance is unhealthy (in this case because you stopped it), it terminates that instance and launches a new one. 当它发现实例不健康时(在这种情况下是因为你停止了它),它会终止该实例并启动一个新实例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM