gloriousbach
gloriousbach

Reputation: 31

Elastic Beanstalk terminates my EC2 instance when all I want to do was stop it temporarily

I have an EC2 instance that was built by elastic beanstalk and it is running fine within its environment.

I need to take a snapshot of the EC2 volume in order to have a backup so as per what I assume is best practice, I go to the EC2 console and stop the EC2 instance that is running under elsatic beanstalk.

The EC2 in instance begins to STOP and then TERMINATES!

This is obviously a big problem. How do I STOP an EC2 instance temporarily that is running under EB?

Upvotes: 3

Views: 2396

Answers (2)

David Levesque
David Levesque

Reputation: 22441

As JeevanDongre mentioned in his answer, it is expected behavior for an EB instance. To have more control over your EC2 instance, you can create it manually instead of using Elastic Beanstalk.

But if all you want to do is create a snapshot, you don't need to stop the instance first. You can use the option "Create Image (EBS AMI)" from the EC2 "Instances" screen and it will automatically stop the instance, create an AMI and a snapshot, then restart the instance for you (that is, unless you select the "No Reboot" option in the Create Image dialog).

Upvotes: 1

Jeevan Dongre
Jeevan Dongre

Reputation: 4649

The Shutdown Behavior of EC2 instance created by Elastic beanstalk is to terminate on stop. If you can change those settings from your application end or API. I guess you problem is solved.

Upvotes: 2

Related Questions