ec2 instance restarts

0

I The ec2 instance I stop keeps restarting. I currently have some Auto scaling on and load balancing. I didn't set it up initially. I would like to turn off my hosting unless I am using it as I test the website. This is also to help save money before I go live with my website. What settings do I need to change?

已提問 1 年前檢視次數 300 次
3 個答案
2

In the Auto Scaling Group you can just set the Minimum Capacity and Desired Capcity to zero. You can also stop your application load balancer to reduce your costs some more.

profile picture
專家
Steve_M
已回答 1 年前
1

You can delete the target group, load balancer and auto scaling group. I would advise to make snapshot, if anything goes wrong you may create an image from the snapshot.

已回答 1 年前
1

If you have auto-scaling and load balancing set up, then it's possible that the instance is being restarted due to the scaling policies defined. You can check the auto-scaling group and load balancer configuration to verify this.

To turn off your hosting and stop the instance, you can follow these steps:

  1. Go to the EC2 console and select the instance that you want to stop.
  2. Click on the "Actions" button and select "Instance State" -> "Stop".
  3. Confirm the action and wait for the instance to stop.

To ensure that the instance does not restart automatically, you can modify the auto-scaling group configuration:

  1. Go to the EC2 console and select the auto-scaling group associated with the instance.
  2. Click on the "Edit" button and select "Desired capacity".
  3. Set the desired capacity to 0.
  4. Click on "Update" to save the changes.

This will prevent the auto-scaling group from launching any new instances to replace the stopped instance.

To save costs, you can also consider using AWS EC2 Spot instances for your website hosting. Spot instances offer significant cost savings compared to on-demand instances, but they can be terminated by AWS with a 2-minute notice if the market price exceeds your bid.

hash
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南