Amin Ali
Amin Ali

Reputation: 55

Can i stop EC2 instance which is using auto scaling group?

I have created ec2 instance and it's part of the auto scaling group and i want to stop this instance so i can save money while this server being not used.Whenever i want to use this server that time i can start the instance.

Upvotes: 1

Views: 1277

Answers (2)

Marcin
Marcin

Reputation: 238159

Instances in ASG can't be stopped. If you want to stop one instance you have to detach it from ASG. When you are ready to start it, you can attach it again.

But really, you should reconsider how you use ASG. Detaching and re-attaching instances from ASG is meant for mostly troubleshooting purposes, not something you do regulatory just to save cost. Its better to set minimum and desired capacity of ASG to 0 if you don't want any instance in it.

Upvotes: 1

Yayotrón
Yayotrón

Reputation: 1869

AutoScaling Group is able to take care of this process for you.

You can change the size of the group manually, or you could schedule custom configurations to scale-up or scale-down as per your needs.

This is all supported through AWS APIs, so you can do this through AWS Console or automating the configuration.

Upvotes: 3

Related Questions