Troubleshoot Amazon EC2 Auto Scaling: EC2 instance launch failures
This page provides information about your EC2 instances that fail to launch, potential causes, and the steps you can take to resolve the issues.
To retrieve an error message, see Retrieve an error message from scaling activities.
When your EC2 instances fail to launch, you might get one or more of the following error messages:
Launch issues
- The requested configuration is currently not supported.
- The security group <name of the security group> does not exist. Launching EC2 instance failed.
- The key pair <key pair associated with your EC2 instance> does not exist. Launching EC2 instance failed.
- The requested Availability Zone is no longer supported. Please retry your request...
- Your requested instance type (<instance type>) is not supported in your requested Availability Zone (<instance Availability Zone>)...
- Your Spot request price of 0.015 is lower than the minimum required Spot request fulfillment price of 0.0735...
- Invalid device name <device name> / Invalid device name upload. Launching EC2 instance failed.
- Value (<name associated with the instance storage device>) for parameter virtualName is invalid...
- EBS block device mappings not supported for instance-store AMIs.
- Placement groups may not be used with instances of type 'm1.large'. Launching EC2 instance failed.
- Client.InternalError: Client error on launch.
- We currently do not have sufficient <instance type> capacity in the Availability Zone you requested... Launching EC2 instance failed.
- There is no Spot capacity available that matches your request. Launching EC2 instance failed.
- <number of instances> instance(s) are already running. Launching EC2 instance failed.
The requested configuration is currently not supported.
-
Cause: Some options in your launch template or launch configuration might not be compatible with the instance type, or the instance configuration might not be supported in your requested Amazon Region or Availability Zones.
-
Solution:
Try a different instance configuration. To search for an instance type that meets your requirements, see Finding an Amazon EC2 instance type in the Amazon EC2 User Guide for Linux Instances.
For further guidance to resolve this issue, check the following:
-
Ensure that you have chosen an AMI that is supported by your instance type. For example, if the instance type uses an Arm-based Amazon Graviton processor instead of an Intel Xeon processor, you need an Arm-compatible AMI.
-
Test that the instance type is available in your requested Region and Availability Zones. The newest generation instance types might not yet be available in a given Region or Availability Zone. The older generation instance types might not be available in newer Regions and Availability Zones. To search for instance types offered by location (Region or Availability Zone), use the describe-instance-type-offerings command. For more information, see Finding an Amazon EC2 instance type in the Amazon EC2 User Guide for Linux Instances.
-
If you use Dedicated Instances or Dedicated Hosts, ensure that you have chosen an instance type that's supported as a Dedicated Instance or Dedicated Host.
-
The security group <name of the security group> does not exist. Launching EC2 instance failed.
-
Cause: The security group specified in your launch template or launch configuration might have been deleted.
-
Solution:
-
Use the describe-security-groups command to get the list of the security groups associated with your account.
-
From the list, select the security groups to use. To create a security group instead, use the create-security-group command.
-
Create a new launch template or launch configuration.
-
Update your Auto Scaling group with the new launch template or launch configuration using the update-auto-scaling-group command.
-
The key pair <key pair associated with your EC2 instance> does not exist. Launching EC2 instance failed.
-
Cause: The key pair that was used when launching the instance might have been deleted.
-
Solution:
-
Use the describe-key-pairs command to get the list of the key pairs available to you.
-
From the list, select the key pair to use. To create a key pair instead, use the create-key-pair command.
-
Create a new launch template or launch configuration.
-
Update your Auto Scaling group with the new launch template or launch configuration using the update-auto-scaling-group command.
-
The requested Availability Zone is no longer supported. Please retry your request...
-
Error message: The requested Availability Zone is no longer supported. Please retry your request by not specifying an Availability Zone or choosing <list of available Availability Zones>. Launching EC2 instance failed.
-
Cause: The Availability Zone associated with your Auto Scaling group might not be currently available.
-
Solution: Update your Auto Scaling group with the recommendations in the error message.
Your requested instance type (<instance type>) is not supported in your requested Availability Zone (<instance Availability Zone>)...
-
Error message: Your requested instance type (<instance type>) is not supported in your requested Availability Zone (<instance Availability Zone>). Please retry your request by not specifying an Availability Zone or choosing <list of Availability Zones that supports the instance type>. Launching EC2 instance failed.
-
Cause: The instance type you chose might not be currently available in the Availability Zones specified in your Auto Scaling group.
-
Solution: Update your Auto Scaling group with the recommendations in the error message.
Your Spot request price of 0.015 is lower than the minimum required Spot request fulfillment price of 0.0735...
-
Cause: The Spot maximum price in your request is lower than the Spot price for the instance type that you selected.
-
Solution: Submit a new request with a higher Spot maximum price (possibly the On-Demand price). Previously, the Spot price you paid was based on bidding. Today, you pay the current Spot price. By setting your maximum price higher, it gives the Amazon EC2 Spot service a better chance of launching and maintaining your required amount of capacity.
Invalid device name <device name> / Invalid device name upload. Launching EC2 instance failed.
-
Cause 1: The block device mappings in your launch template or launch configuration might contain block device names that are not available or currently not supported.
-
Solution:
-
Verify which device names are available for your specific instance configuration. For more details on device naming, see Device names on Linux instances in the Amazon EC2 User Guide for Linux Instances.
-
Manually create an Amazon EC2 instance that is not part of the Auto Scaling group and investigate the problem. If the block device naming configuration conflicts with the names in the Amazon Machine Image (AMI), the instance will fail during launch. For more information, see Block device mappings in the Amazon EC2 User Guide for Linux Instances.
-
After you confirm that your instance launched successfully, use the describe-volumes command to see how the volumes are exposed to the instance.
-
Create a new launch template or launch configuration using the device name listed in the volume description.
-
Update your Auto Scaling group with the new launch template or launch configuration using the update-auto-scaling-group command.
-
Value (<name associated with the instance storage device>) for parameter virtualName is invalid...
-
Error message: Value (<name associated with the instance storage device>) for parameter virtualName is invalid. Expected format: 'ephemeralNUMBER'. Launching EC2 instance failed.
-
Cause: The format specified for the virtual name associated with the block device is incorrect.
-
Solution:
-
Create a new launch template or launch configuration by specifying the device name in the
virtualName
parameter. For information about the device name format, see Device naming on Linux instances in the Amazon EC2 User Guide for Linux Instances. -
Update your Auto Scaling group with the new launch template or launch configuration using the update-auto-scaling-group command.
-
EBS block device mappings not supported for instance-store AMIs.
-
Cause: The block device mappings specified in the launch template or launch configuration are not supported on your instance.
-
Solution:
-
Create a new launch template or launch configuration with block device mappings supported by your instance type. For more information, see Block device mapping in the Amazon EC2 User Guide for Linux Instances.
-
Update your Auto Scaling group with the new launch template or launch configuration using the update-auto-scaling-group command.
-
Placement groups may not be used with instances of type 'm1.large'. Launching EC2 instance failed.
-
Cause: Your cluster placement group contains an invalid instance type.
-
Solution:
-
For information about valid instance types supported by the placement groups, see Placement groups in the Amazon EC2 User Guide for Linux Instances.
-
Follow the instructions detailed in the Placement groups to create a new placement group.
-
Alternatively, create a new launch template or launch configuration with the supported instance type.
-
Update your Auto Scaling group with a new placement group, launch template, or launch configuration using the update-auto-scaling-group command.
-
Client.InternalError: Client error on launch.
-
Problem: Amazon EC2 Auto Scaling tries to launch an instance that has an encrypted EBS volume, but the service-linked role does not have access to the Amazon KMS customer managed key used to encrypt it. For more information, see Required Amazon KMS key policy for use with encrypted volumes.
-
Cause 1: You need a key policy that gives permission to use the customer managed key to the proper service-linked role.
-
Solution 1: Allow the service-linked role to use the customer managed key as follows:
-
Determine which service-linked role to use for this Auto Scaling group.
-
Update the key policy on the customer managed key and allow the service-linked role to use the customer managed key.
-
Update the Auto Scaling group to use the service-linked role.
For an example of a key policy that lets the service-linked role use the customer managed key, see Example 1: Key policy sections that allow access to the customer managed key.
-
-
Cause 2: If the customer managed key and Auto Scaling group are in different Amazon accounts, you need to configure cross-account access to the customer managed key in order to give permission to use the customer managed key to the proper service-linked role.
-
Solution 2: Allow the service-linked role in the external account to use the customer managed key in the local account as follows:
-
Update the key policy on the customer managed key to allow the Auto Scaling group account access to the customer managed key.
-
Define an IAM user or role in the Auto Scaling group account that can create a grant.
-
Determine which service-linked role to use for this Auto Scaling group.
-
Create a grant to the customer managed key with the proper service-linked role as the grantee principal.
-
Update the Auto Scaling group to use the service-linked role.
For more information, see Example 2: Key policy sections that allow cross-account access to the customer managed key.
-
-
Solution 3: Use a customer managed key in the same Amazon account as the Auto Scaling group.
-
Copy and re-encrypt the snapshot with another customer managed key that belongs to the same account as the Auto Scaling group.
-
Allow the service-linked role to use the new customer managed key. See the steps for Solution 1.
-
We currently do not have sufficient <instance type> capacity in the Availability Zone you requested... Launching EC2 instance failed.
-
Error message: We currently do not have sufficient <instance type> capacity in the Availability Zone you requested (<requested Availability Zone>). Our system will be working on provisioning additional capacity. You can currently get <instance type> capacity by not specifying an Availability Zone in your request or choosing <list of Availability Zones that currently supports the instance type>. Launching EC2 instance failed.
-
Cause: At this time, Amazon EC2 cannot support your instance type in your requested Availability Zone.
-
Solution:
To resolve the issue, try the following:
-
Wait a few minutes and then submit your request again; capacity can shift frequently.
-
Submit a new request following the recommendations in the error message.
-
Submit a new request with a reduced number of instances (which you can increase at a later stage).
-
There is no Spot capacity available that matches your request. Launching EC2 instance failed.
-
Cause: At this time, there isn't enough spare capacity to fulfill your request for Spot Instances.
-
Solution:
To resolve the issue, try the following:
-
Wait a few minutes; capacity can shift frequently. The Spot request continues to automatically make the launch request until capacity becomes available. When capacity becomes available, the Amazon EC2 Spot service fulfills the Spot request.
-
Follow the best practice of using a diverse set of instance types so that you are not reliant on one specific instance type. For more information, including a list of best practices for using Spot Instances successfully, see Auto Scaling groups with multiple instance types and purchase options.
-
Submit a new request with a reduced number of instances (which you can increase at a later stage).
-
<number of instances> instance(s) are already running. Launching EC2 instance failed.
-
Cause: You have reached the limit on the number of instances that you can launch in a Region. When you create your Amazon account, we set default limits on the number of instances you can run on a per-Region basis.
-
Solution:
To resolve the issue, try the following:
-
If your current limits aren't adequate for your needs, you can request a quota increase on a per-Region basis. For more information, see Amazon EC2 service quotas in the Amazon EC2 User Guide for Linux Instances.
-
Submit a new request with a reduced number of instances (which you can increase at a later stage).
-