Why can't I start or launch my EC2 instance?

Last updated: 2021-07-23

I can't launch or start my Amazon Elastic Compute Cloud (Amazon EC2) instance. How can I troubleshoot this problem?

Short description

There are multiple reasons why you might not be able to launch or start your EC2 instance. If you don't receive an error code when attempting to start the instance, then run the describe-instances command in the AWS Command Line Interface (AWS CLI) . Then, specify the instance ID to view the reason for the problem. In the following example, replace MYINSTANCE with the id of the instance that you're trying to start.

Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.

aws ec2 describe-instances --instance-id MYINSTANCE --output json

Check the StateReason message in the JSON response returned by the command.

In the following example, the StateReason returned is "Client.InternalError".

"StateReason": {
     "Message": "Client.InternalError: Client error on launch",
     "Code": "Client.InternalError"
   },

Resolution

The following are common errors that can prevent you from starting your instance:

InsufficientInstanceCapacity

Error message: "An error occurred (InsufficientInstanceCapacity) when calling the RunInstances operation (reached max retries: 4). We currently do not have sufficient capacity in the Availability Zone you requested." This error occurs if there isn't enough On-Demand capacity to complete your request.

For information on resolving this error, see How do I troubleshoot InsufficientInstanceCapacity errors when starting or launching an EC2 instance?

InstanceLimitExceeded

Error message: "Your quota allows for 0 more running instance(s)." This error occurs if you launched the maximum allowed instances in your Region.

For information on resolving this error, see How do I troubleshoot InstanceLimitExceeded errors when starting or launching an EC2 instance?

UnauthorizedOperation

The UnauthorizedOperation error indicates that the user attempting to launch the instance doesn't have the required permissions. For information on resolving this error, see Why am I receiving the error message "You are not authorized to perform this operation" when I try to launch an EC2 instance?

The requested configuration is currently not supported.

This error is caused by the following two issues:

1.    The specified instance type isn't supported in the requested Availability Zone. Run the aws ec2 describe-instance-type-offerings command in the AWS CLI to check the availability of the instance types in specific Availability Zones. Then, launch the instance in a supported Availability Zone.

For example, use the following command to check availability of the c5.2xlarge instance type across all Availability Zones in us-east-1:

aws ec2 describe-instance-type-offerings --location-type availability-zone --filters Name=instance-type,Values=c5.2xlarge --region us-east-1

2.    The Amazon Machine Image (AMI) used to launch the instance doesn't support the selected instance type. Refer to the AMI description in the AWS Documentation before selecting the instance type or family. This issue commonly occurs when using Marketplace AMIs and launching them using the AWS CLI. When launching instances from the Amazon EC2 console, unsupported instances are unavailable.

Client.InternalError

There are several reasons you might receive this error:

  • An Amazon Elastic Block Store (Amazon EBS) volume isn't correctly attached to the instance.
  • An EBS volume that's attached to the instance is in an ERROR state.
  • An encrypted EBS volume is attached to the instance. However, you don't have permissions to access the AWS Key Management Services (AWS KMS) for decryption.

For information on resolving these issues, see I'm unable to start my instance and I see Client.InternalError when running the describe-instances command. How do I fix this?