Skip to content

EC2 instance stuck in "shutting-down" state for over 72 hours — force stop and terminate both failed

0

Region: eu-west-2

Instance ID: i-0e3ebad281b331957

Instance Name: Sentry

Problem

My EC2 instance became unresponsive and I tried to stop it, but it got stuck in the "stopping" state. After waiting with no progress, I issued a force stop which also had no effect. As a last resort I terminated the instance, but it then transitioned to "shutting-down" and has been stuck there for over 72 hours.

Steps taken

  1. Instance became stuck in "stopping" state
  2. Waited 60+ minutes — no progress
  3. Issued force stop — no effect, instance remained in "stopping"
  4. Issued terminate — instance moved to "shutting-down" and has been stuck there for over 72 hours

Commands run

aws ec2 stop-instances --instance-ids i-0e3ebad281b331957 --force
aws ec2 terminate-instances --instance-ids i-0e3ebad281b331957

Both commands completed without errors, but the instance state never changed.

Question

At this point I assume this requires intervention on the underlying host by AWS. Has anyone experienced this before? Did it eventually resolve on its own, or did it require AWS support escalation?

Note: I'm on the Basic support plan and would prefer not to upgrade to a paid plan just to resolve this. Any help or workarounds appreciated.

asked 2 months ago71 views
1 Answer
1

Based on the new force terminate capability for EC2 instances, you should be able to resolve this situation. Amazon EC2 now supports force terminating instances that are stuck in the shutting-down state, which is exactly the scenario you're experiencing.

When you use force terminate, the instance will first attempt a graceful shutdown process. If that's unsuccessful within the timeout period, it proceeds with a forced shutdown. This allows you to recover resources associated with stuck instances, such as vCPU quotas or Elastic IP addresses, without waiting for AWS intervention.

You can force terminate your instance through either the EC2 console or the AWS CLI. For the CLI, you would use the TerminateInstances command with the appropriate force parameter. Note that a forced shutdown may not flush file system caches and metadata or run shutdown scripts before termination, but given that your instance has been stuck for over 72 hours, this is likely your best path forward.

This functionality is available in all commercial regions, including eu-west-2 where your instance is located. The force terminate feature was specifically designed to give customers greater flexibility in managing EC2 instances without requiring AWS support intervention for these types of stuck instance scenarios.

If force terminate doesn't resolve the issue after a reasonable time (typically a few minutes, though it can take up to 10 minutes), you may need to attempt it again or ultimately contact AWS support if the problem persists.
Sources
Amazon EC2 now supports force terminate for EC2 instances - AWS
Force stop stuck Lightsail instances - Amazon Lightsail

answered 2 months ago
EXPERT
reviewed 2 months ago
  • I ran this command multiple times but the instance remains stuck in shutting-down:

    aws ec2 terminate-instances \
      --instance-ids i-0e3ebad281b331957 \
      --force \
      --skip-os-shutdown
    

    Each time the response shows both CurrentState and PreviousState as shutting-down (code 32), meaning it was already in that state before the command ran — so the command has no effect:

    {
        "TerminatingInstances": [
            {
                "InstanceId": "i-0e3ebad281b331957",
                "CurrentState": {
                    "Code": 32,
                    "Name": "shutting-down"
                },
                "PreviousState": {
                    "Code": 32,
                    "Name": "shutting-down"
                }
            }
        ]
    }

    The instance has been stuck in this state for 72+ hours. Is there anything else I can try, or does this require AWS support intervention?

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.