aws ec2 describe-instance-types
Describes the specified instance types. AWS CLI reference
2 examples 6 options Its page in the AWS CLI reference
Examples
Example 1: To describe an instance type
The following describe-instance-types example displays details for the specified instance type.
aws ec2 describe-instance-types --instance-types t2.microIdentify--instance-typesThe instance types.Its output, shortened
{
"InstanceTypes": [
{
"InstanceType": "t2.micro",
"CurrentGeneration": true,
"FreeTierEligible": true,
"SupportedUsageClasses": [
"on-demand",
"spot"
],
"SupportedRootDeviceTypes": [
"ebs"
],
"BareMetal": false,
"Hypervisor": "xen",
"ProcessorInfo": {
"SupportedArchitectures": [
"i386",
"x86_64"
],
"SustainedClockSpeedInGhz": 2.5
},
"VCpuInfo": {
"DefaultVCpus": 1,
"DefaultCores": 1,
"DefaultThreadsPerCore": 1,
"ValidCores": [
1
],
"ValidThreadsPerCore": [
… 32 more linesFor more information, see Amazon EC2 instance types in the Amazon EC2 User Guide.
Example 2: To filter the available instance types
The following describe-instance-types example lists the instance types that support hibernation. You can specify a filter to scope the results to instance types that have a specific characteristic.
aws ec2 describe-instance-types --filters Name=hibernation-supported,Values=true --query 'InstanceTypes[*].InstanceType'Identify--filtersOne or more filters.--queryA JMESPath query to use in filtering the response data.Its output
[
"m5.8xlarge",
"r3.large",
"c3.8xlarge",
"r5.large",
"m4.4xlarge",
"c4.large",
"m5.xlarge",
"m4.xlarge",
"c3.large",
"c4.8xlarge",
"c4.4xlarge",
"c5.xlarge",
"c5.12xlarge",
"r5.4xlarge",
"c5.4xlarge"
]For more information, see Amazon EC2 instance types in the Amazon EC2 User Guide.
Options
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--filtersOne or more filters.--include-unsupported-in-regionIf true, the response includes instance types that are not supported in the current Region, in addition to the supported types.--instance-typesThe instance types.--max-resultsThe maximum number of items to return for this request.--next-tokenThe token returned from a previous paginated request.