- Newest
- Most votes
- Most comments
Thanks for replying, but actually I wanted a command that would show me the amount not only that there is a certain type of instance.
When I try to launch p2.xlarge, I sometimes get:
We currently do not have sufficient p2.xlarge capacity in the Availability Zone you requested (us-east-1b). Our system will be working on provisioning additional capacity. You can currently get p2.xlarge capacity by not specifying an Availability Zone in your request or choosing us-east-1a, us-east-1c, us-east-1d, us-east-1e.
However, there's no way in the console to remove the availability zone, just to change it, and then I need to try one by one... How to solve it?
aws ec2 describe-instance-type offerings
shows only the types of instances, but does not offer any clue about how many are available, looking at the examples in https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instance-type-offerings.html. It does not even work for me for some reason. It would be useful if the error message gives a URL where the permission can be granted.
$ aws ec2 describe-instance-type-offerings --location-type "availability-zone" --filters Name=location,Values=us-east-2a --region us-east-2 --query "InstanceTypeOfferings[*].[InstanceType]" --output text
An error occurred (UnauthorizedOperation) when calling the DescribeInstanceTypeOfferings operation: You are not authorized to perform this operation. User: YYY is not authorized to perform: ec2:DescribeInstanceTypeOfferings with an explicit deny in a service control policy
To check the availability of instance types in different AZ, you can use the following cli commands:
- List all AZ in region
aws ec2 describe-availability-zones --region us-east-1
- List instance type available by AZ.
aws ec2 describe-instance-type-offerings --region us-east-1 --location-type availability-zone --filters "Name=instance-type,Values=c7a.large" --output text
Unfortunately, AWS does not make public the quantity of instance types available by region/AZ.
Relevant content
- asked 7 months ago
- asked a year ago
- asked 21 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 3 months ago
That information is not available to the customers.