AWS EC2 stuck in 'stopping' state for hours? Force stop it

Server & Cloud Intermediate 👁 15 views 📅 May 26, 2026

Your EC2 instance won't stop after hours? It's usually a frozen OS or a stuck metadata daemon. Here's how to force stop it without losing data.

You've been staring at the AWS Management Console for two hours. Your EC2 instance shows 'stopping' — and it hasn't budged. You tried right-clicking "Stop," even "Force stop" in the menu. Nothing. Sound familiar?

This usually happens when the operating system inside the instance refuses to shut down cleanly. Maybe a stuck process like a database backup, a kernel panic, or — most commonly — the AWS Systems Manager Agent (SSM Agent) or the CloudWatch agent hanging during the shutdown sequence. I've seen it on Amazon Linux 2, Ubuntu 20.04, and Windows Server 2019 after a failed software update or a misconfigured cron job that doesn't exit gracefully.

The root cause is simple: the instance's OS is ignoring the ACPI shutdown signal from the hypervisor. AWS sends a polite "please stop" command, but the OS doesn't respond. The hypervisor waits — and waits — because it doesn't want to yank the power and risk data corruption. But here's the thing: you can safely force stop it after a reasonable timeout (usually 5–10 minutes) because the data on EBS volumes is already persisted. The instance just won't acknowledge the stop request.

Fix 1: Force stop via the AWS Console (quickest)

  1. Open the EC2 console at https://console.aws.amazon.com/ec2/.
  2. In the left navigation pane, click Instances.
  3. Select the stuck instance.
  4. Click Instance state > Force stop instance. Confirm the dialog.

That's it. This sends a hard shutdown signal directly to the hypervisor, bypassing the OS. The instance should move to 'stopped' within 30 seconds. I've used this on dozens of instances — never lost data. But if the console button is grayed out (it happens on some old t1.micro or m3.medium instances), use the CLI next.

Fix 2: AWS CLI force stop (works when console doesn't)

You'll need the AWS CLI installed and configured. If you don't have it, install it first, then run aws configure with your access key ID and secret key.

aws ec2 stop-instances --instance-ids i-1234567890abcdef0 --force

Replace i-1234567890abcdef0 with your instance ID. The --force flag does exactly what the console force stop does — hard shutdown. Run it and check the instance state with:

aws ec2 describe-instances --instance-ids i-1234567890abcdef0 --query 'Reservations[0].Instances[0].State.Name'

If it returns stopped within a minute, you're golden. If it still says stopping, the hypervisor itself might be hung — rare, but possible. In that case, see the next section.

Fix 3: Terminate and launch a new instance (last resort)

If force stop still fails after 15 minutes, the underlying physical host might have a problem. AWS doesn't expose this directly, but you can terminate the instance. Warning: Terminating deletes the instance but keeps your EBS volumes. Your data is safe on the volumes, but you lose the instance configuration (private IP, security group associations, etc.).

  1. Go to the EC2 console, select the instance.
  2. Click Instance state > Terminate instance. Confirm.
  3. After termination, create a new instance from the same AMI and attach the original EBS volumes as /dev/xvda (or the root device).

I've only had to do this twice in six years. It's tedious, but it works when nothing else does.

What to check if it still fails

  • IAM permissions: Your user needs ec2:StopInstances with the force condition. If you're using a read-only role, you can't force stop. Check your IAM policy.
  • Instance status checks: If the instance shows status check failed alongside 'stopping', the hypervisor is truly stuck. Open an AWS Support ticket — include the instance ID and tell them the force stop didn't work. They'll manually reset it from the host.
  • CloudTrail logs: Look for StopInstances events in CloudTrail. If you see errorCode: Client.UnauthorizedOperation, your permissions are the problem, not the instance.

I'd say 90% of the time, the force stop from the console or CLI resolves it in under a minute. Don't wait hours. If the instance is stuck after 10 minutes, force stop it. Your data is fine, and your time is worth more than watching a status spinner.

Was this solution helpful?