I'm unable to start my instance and I see Client.InternalError when running the describe-instances command. How do I fix this?

Last updated: 2020-03-30

I'm trying to start my Amazon Elastic Compute Cloud (Amazon EC2) instance and the instance either doesn't start and doesn't return an error message, or it doesn't start and returns the error message "Client.InternalError". How can I fix this? 

Short Description

There are several reasons you might see the Client.InternalError message:

  • Your Elastic Block Store (Amazon EBS) volume isn't attached to the instance correctly.
  • An EBS volume attached to the instance is in an error state.
  • EBS volumes attached to the instance are encrypted.

Note: If your instance doesn't start and no error code appears, run the describe-instances command. Then, specify the instance ID. In the following example, replace MYINSTANCE with the id of the instance that you're trying to start.

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

EBS volumes aren't attached to the instance correctly

If the EBS root volume isn't attached to the instance as /dev/sda1 or /dev/xvda and a second EBS volume has a duplicate or conflicting device name, then you can't stop or start the instance.

  1. Open the Amazon EC2 console, and then select the instance that you can't start.
  2. On the Description tab, verify what device name is listed in Block devices. The Block devices field displays all devices names of the attached volumes.
  3. Verify that the root device is correctly attached and that there isn't a device listed with the same name or with a conflicting name.
  4. If there is a device with a duplicate or conflicting device name, detach the conflicting volume and rename it. Then, reattach the volume with the updated device name.

An attached EBS volume is in an ERROR state

Open the Amazon EC2 console, choose Volumes, and then verify if the status of the volume is error. Your options vary depending on whether the volume in an error state is a root volume or a secondary volume.

If the volume in an error state is a secondary volume, detach the volume. You can now start the instance.

If the volume in an error state is a root volume and you have an existing snapshot of the volume:

  1. Detach the volume.
  2. Create a new volume from the snapshot.
  3. Attach the new volume to the instance using the device name of the original instance. Start the instance.

Note: If the volume in an error state is a root volume and you don't have an existing snapshot of the volume, then you can't restart the instance. You must rebuild the instance.

Attached volumes are encrypted

If the attached volumes are encrypted, verify the following:

Note: To verify if a volume is encrypted, open the Amazon EC2 console, and then select Volumes. Encrypted volumes have Encrypted listed in the Encryption column.