1

I want to change the config of EC2 instance that created by Elastic BeanStalk, but when I stop instance ( from EC2 --> Running instance --> Action) instead of stopping, the instance state change to terminated and after that go to pending and running, so I can't change instance type.

Mohammad Ranjbar Z
  • 1,487
  • 1
  • 10
  • 20

1 Answers1

1

Check the ShutDown behaviour of the Instance and if it is set to "Terminate", make sure you change it to "Stop".

To change the shutdown behavior of an instance using the console

Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

In the navigation pane, choose Instances.

Select the instance, and choose Actions, Instance Settings, Change Shutdown Behavior. The current behavior is already selected.

To change the behavior, select an option from the Shutdown behavior list, and then choose Apply.

Please refer: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using_ChangingInstanceInitiatedShutdownBehavior

X-Men
  • 433
  • 3
  • 9
  • Thanks, your answer was correct but not-completed, after doing what you said, I changed the Auto scaling group config and set the min=1, desired=1, and max=2, then I could to change my instance type – Mohammad Ranjbar Z Jan 07 '20 at 04:59