Amazon Elastic Compute Cloud
User Guide for Linux Instances

What to Do If an Instance Immediately Terminates

After you launch an instance, we recommend that you check its status to confirm that it goes from the pending state to the running state, not the terminated state.

The following are a few reasons why an instance might immediately terminate:

  • You've reached your EBS volume limit. For information about the volume limit, see Instance Volume Limits. To submit a request to increase your Amazon EBS volume limit, complete the AWS Support Center Create Case form. For more information, see Amazon EC2 Service Limits.

  • An EBS snapshot is corrupt.

  • The instance store-backed AMI you used to launch the instance is missing a required part (an image.part.xx file).

Getting the Reason for Instance Termination

You can use the Amazon EC2 console, CLI, or API to get information about the reason that the instance terminated.

To get the reason that an instance terminated using the console

  1. Open the Amazon EC2 console at

  2. In the navigation pane, choose Instances, and select your instance.

  3. In the Description tab, locate the reason next to the label State transition reason. If the instance is still running, there's typically no reason listed. If you've explicitly stopped or terminated the instance, the reason is User initiated shutdown.

To get the reason that an instance terminated using the command line

  1. Use the describe-instances command:

    aws ec2 describe-instances --instance-id instance_id
  2. In the JSON response that's displayed, locate the StateReason element. It looks similar to the following example.

    "StateReason": { "Message": "Client.UserInitiatedShutdown: User initiated shutdown", "Code": "Client.UserInitiatedShutdown" },

    This example response shows the reason code that you'll see after you stop or terminate a running instance. If the instance terminated immediately, you see code and message elements that describe the reason that the instance terminated (for example, VolumeLimitExceeded).