EC2 Instance will not stop or terminate after trying to create an AMI from the running instance

Solution 1:

If you don't have premium support, then "stuck" instances (where you can't stop/terminate them) and "stuck" volumes (where you can't detach/delete them) can be reported to Amazon on the EC2 forum:

Amazon AWS EC2 Forum
https://forums.aws.amazon.com/forum.jspa?forumID=30

Make sure you list the specific instance/volume ids involved.

Nobody but Amazon can really help in these situations.

Fortunately, you should not be charged for instance hours once it enters the "stopping" or "terminating" state.

Your original problem about not being able to connect to the instance through ssh could also be posted on the EC2 forum for help from the community, but it is a common problem and has many potential causes. I've written an article to help start diagnose this and to point out pieces of information you should include in your forum post:

Solving: "I can't connect to my server on Amazon EC2"
http://alestic.com/2009/08/ec2-connectivity

I've also written an article describing a method that can be used to diagnose EBS boot instances by looking at the log files on the disk even if you can't connect to the instance:

Fixing Files on the Root EBS Volume of an EC2 Instance
http://alestic.com/2011/02/ec2-fix-ebs-root

However, you won't be able to use this approach until Amazon helps you detach your EBS volume.

Solution 2:

I know this post is old, but you can also click stop again, and the dashboard will ask you if you want to do a forced stop. Sometimes, I know this from experience, you have to do two or three forced stops to get it to work.

Credit to Robin Scott.

Tags:

Amazon Ec2