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?

asked 10 months ago247 views
3 Answers
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
EXPERT
Steve_M
answered 10 months ago
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.

answered 10 months ago
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
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions