Amazon Elastic Compute Cloud (EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. With EC2, you can launch virtual servers, known as instances, to run applications on the AWS infrastructure.
When attempting to launch an EC2 instance, you might encounter an error message stating InsufficientInstanceCapacity. This indicates that AWS does not have enough available capacity to fulfill your request for the specified instance type in the selected availability zone.
During the instance launch process, the request fails, and you receive an error message similar to: "Your requested instance type (m5.large) is currently not available in the Availability Zone (us-west-2a). Please try a different instance type or zone."
The InsufficientInstanceCapacity error occurs when there is a temporary lack of available resources in the AWS region or availability zone you are trying to use. This can happen during peak usage times or if the instance type you requested is in high demand.
Each AWS region is divided into multiple availability zones, which are isolated locations within the region. Each zone has its own capacity limits for different instance types. When demand exceeds supply, AWS cannot fulfill requests for certain instance types in specific zones.
To resolve this issue, consider the following steps:
Attempt to launch your instance in a different availability zone within the same region. For example, if you initially tried us-west-2a
, consider us-west-2b
or us-west-2c
. You can specify the availability zone in the AWS Management Console or using the AWS CLI:
aws ec2 run-instances --image-id ami-12345678 --count 1 --instance-type m5.large --key-name MyKeyPair --availability-zone us-west-2b
If changing the availability zone doesn't work, try selecting a different instance type that meets your requirements. Some instance types may have more available capacity. You can view available instance types in the AWS EC2 Instance Types documentation.
Visit the AWS Service Health Dashboard to check for any ongoing issues or maintenance that might be affecting capacity in your chosen region or zone.
The InsufficientInstanceCapacity error is a common issue when launching EC2 instances, especially during peak times or with popular instance types. By trying different availability zones or instance types, you can often work around this limitation. Always keep an eye on the AWS Service Health Dashboard for real-time updates on AWS infrastructure status.
Let Dr. Droid create custom investigation plans for your infrastructure.
Book Demo