I have used AWS Auto Scaling to set up for my web server. My setting config is 1 for desired, minimum and maximum instances.
Now I want to stop my server, but i may want to restart it in future.
But if I stop directly in EC2 dashboard, it will respawn another EC2 instance, due to AWS Auto Scaling config.
So can I stop my server by setting 0 for desired, minimum and maximum instances ?
I know setting desired instance as 0 will terminate my current instance now, but in this case, if I change desired instance to 1 in future(it will initialize a new instance), can new instance will be initialized with last state when terminated, or it will be initialized with state of setting AMI ?
If your auto scaler is set up through Elastic Beanstalk, then you can scale your instances down to 0 through the configuration:
At the specified time, your instances will be scaled down to 0. Go through similar steps to scale your instances back up.