Skip to content

my ec2 instance is hung

0

i can't stop it or reboot it, instance id: i-0c87a9df5608b479e. thanks!

asked a year ago143 views

1 Answer
0

I understand you're dealing with a hung EC2 instance that won't stop or reboot. This is a common issue that can occur with EC2 instances. Here's how you can address it:

  1. Try using the AWS CLI to force stop the instance with this command:
aws ec2 stop-instances --instance-ids i-0c87a9df5608b479e --force

You can run this command from AWS CloudShell if you don't have the CLI set up locally.

  1. If the force stop doesn't work after about 10 minutes, you have a few options:
  • Post a request for help on AWS re:Post, including your instance ID and describing the steps you've already taken.

  • If you have an AWS support plan, create a technical support case in the AWS Support Center for faster, more tailored assistance.

  1. While waiting for a response, you might consider creating a replacement instance as a temporary solution:
  • Create an Amazon Machine Image (AMI) from the stuck instance
  • Launch a new instance using this AMI
  • Update your DNS or load balancer settings to point to the new instance
  1. Be aware that if the instance remains stuck for several hours, Amazon EC2 may eventually treat it as a stuck instance and forcibly terminate it, though this isn't guaranteed.

Note that while your instance is in the 'stopping' state, you are not being charged for its usage.
Sources
What do we do when an instance won't reboot or even force stop? | AWS re:Post
EC2 instance not restarting | AWS re:Post
Troubleshoot Amazon EC2 instance stop issues - Amazon Elastic Compute Cloud
My Ec2 instance stops completely and does not stop. | AWS re:Post

answered a year ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.