On the limit page at any region in aws ec2 service there are limits for instances i can create:
aws gamelift describe-ec2-instance-limits --query 'EC2InstanceLimits[].{EC2InstanceType:EC2InstanceType,InstanceLimit:InstanceLimit}' --region us-east-1 --output text
Above command is near the thing i need. Output looking like:
r3.8xlarge 2
m3.xlarge 15
m4.10xlarge 1
c4.large 20
r3.xlarge 15
r3.large 20
m4.xlarge 15
m4.2xlarge 10
t2.small 20
c3.4xlarge 5
t2.large 20
c4.4xlarge 5
c3.xlarge 15
c4.xlarge 15
m3.2xlarge 10
c4.2xlarge 10
r3.2xlarge 10
m3.medium 20
t2.micro 20
c3.2xlarge 10
c3.large 20
m3.large 20
m4.large 20
c4.8xlarge 2
m4.4xlarge 5
c3.8xlarge 2
t2.medium 20
r3.4xlarge 5
What i need is to get a list of all instance types that are available for region to create. At this page: https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Limits:, you can see a table with Instance Limits header, that has Name and Current Limit columns. I need to get a full list of Instance Type and its Current Limit, so i can create instances using this information.
Like:
r3.8xlarge 5
c3.4xlarge 10
c4.8xlarge 0
etc(all instances), meaning i can create right now in this region 5 instances of r3.8xlarge, 10 instances of c3.4xlarge and 0 of c4.8xlarge.