This error occurs when you try to launch an Amazon EC2 instance, but you have reached the maximum number of instances allowed in your AWS account for that specific instance type or region.
Why This Error Occurs
- Default Quota Limit: Each AWS account has default quotas (limits) on the number of resources that can be launched in a specific region.
- Exceeded Instance Limit: You may have already reached your limit for the number of instances or vCPUs for the specified instance type or region.
- Different Limits for Different Instance Families: AWS limits can vary by instance type, so you might hit a limit for a specific instance family.
- Pending Terminated Instances: Sometimes terminated instances may still count toward your quota until they are fully released.
Troubleshooting Steps
1. Check Your Current Quotas
Step 1. Before launching more EC2 instances, check your current quota limits in the AWS Management Console.
Step 2. Go to Service Quotas or EC2 Dashboard > Limits to view your EC2 instance limits per region and per instance type.
2. Terminate Unused Instances
Step 1. If you’ve reached the limit for running instances, check for unused instances that you can terminate to free up capacity.
Step 2. Terminate unused instances in the EC2 Dashboard by selecting the instances and choosing Actions > Instance State > Terminate.
Remember that terminated instances might still show in the console for a short time until AWS releases all the associated resources.
3. Request a Limit Increase
If you need more instances than your current limit allows, you can request a limit increase through AWS Support:
Step 1. In the AWS Management Console, go to Service Quotas.
Step 2. Search for EC2 Instance Limits.
Step 3. Select the instance type for which you need a limit increase.
Step 4. Click Request Quota Increase and specify the new limit you require.
AWS will review the request and typically respond within a few hours or days.
4. Try Launching in a Different Region
If you hit a limit in one region, you may have available capacity in other regions.
To switch regions: In the AWS Management Console, click on the region dropdown at the top right and select a different region.
Ensure that the instance type you are using is available in the new region by checking the EC2 Instance Types list for the region.
5. Verify Pending Terminated Instances
If you have recently terminated instances but are still facing the limit issue, AWS might not have released all resources associated with those instances yet.
Wait a few minutes, and then try launching the instance again.
You can view the state of your instances in the EC2 Console.
6. Use Different Instance Types
If your limit for one instance family is exhausted, you may be able to launch instances of a different family.
Check your limits for different instance types and try launching an instance that has available capacity.
You can find the instance limits by family type in Service Quotas.