Table: aws_ec2_instance_type - Query AWS EC2 Instance Type using SQL
The AWS EC2 Instance Type is a component of Amazon's Elastic Compute Cloud (EC2), which provides scalable computing capacity in the Amazon Web Services (AWS) cloud. It defines the hardware of the host computer used for the instance. Different instance types offer varying combinations of CPU, memory, storage, and networking capacity, giving you the flexibility to choose the appropriate mix of resources for your applications.
Table Usage Guide
The aws_ec2_instance_type
table in Steampipe provides you with information about EC2 instance types within AWS Elastic Compute Cloud (EC2). This table allows you, as a DevOps engineer, to query instance type-specific details, including its name, current generation, vCPU, memory, storage, and network performance. You can utilize this table to gather insights on instance types, such as their capabilities, performance, and associated metadata. The schema outlines the various attributes of the EC2 instance type for you, including the instance type, current generation, vCPU, memory, storage, and network performance.
Examples
List of instance types which supports dedicated host
Explore which AWS EC2 instance types support a dedicated host. This is useful for identifying the types of instances that can be used for tasks requiring dedicated resources, enhancing performance and security.
select instance_type, dedicated_hosts_supportedfrom aws_ec2_instance_typewhere dedicated_hosts_supported;
select instance_type, dedicated_hosts_supportedfrom aws_ec2_instance_typewhere dedicated_hosts_supported = 1;
List of instance types which does not support auto recovery
Discover the segments of AWS EC2 instances that do not support auto-recovery. This is useful to identify potential risk areas in your infrastructure that may require manual intervention in case of system failures.
select instance_type, auto_recovery_supportedfrom aws_ec2_instance_typewhere not auto_recovery_supported;
select instance_type, auto_recovery_supportedfrom aws_ec2_instance_typewhere auto_recovery_supported = 0;
List of instance types which have more than 24 cores
Determine the areas in which AWS EC2 instance types support dedicated hosts and have more than 24 default cores. This can be useful for identifying high-performance instances suitable for resource-intensive applications.
select instance_type, dedicated_hosts_supported, v_cpu_info -> 'DefaultCores' as default_cores, v_cpu_info -> 'DefaultThreadsPerCore' as default_threads_per_core, v_cpu_info -> 'DefaultVCpus' as default_vcpus, v_cpu_info -> 'ValidCores' as valid_cores, v_cpu_info -> 'ValidThreadsPerCore' as valid_threads_per_corefrom aws_ec2_instance_typewhere v_cpu_info ->> 'DefaultCores' > '24';
select instance_type, dedicated_hosts_supported, json_extract(v_cpu_info, '$.DefaultCores') as default_cores, json_extract(v_cpu_info, '$.DefaultThreadsPerCore') as default_threads_per_core, json_extract(v_cpu_info, '$.DefaultVCpus') as default_vcpus, json_extract(v_cpu_info, '$.ValidCores') as valid_cores, json_extract(v_cpu_info, '$.ValidThreadsPerCore') as valid_threads_per_corefrom aws_ec2_instance_typewhere CAST( json_extract(v_cpu_info, '$.DefaultCores') AS INTEGER ) > 24;
List of instance types which does not support encryption to root volume
Identify instances where the type of Amazon EC2 instance does not support encryption for the root volume. This is beneficial for maintaining security standards and ensuring sensitive data is adequately protected.
select instance_type, ebs_info ->> 'EncryptionSupport' as encryption_supportfrom aws_ec2_instance_typewhere ebs_info ->> 'EncryptionSupport' = 'unsupported';
select instance_type, json_extract(ebs_info, '$.EncryptionSupport') as encryption_supportfrom aws_ec2_instance_typewhere json_extract(ebs_info, '$.EncryptionSupport') = 'unsupported';
List of instance types eligible for free tier
Determine the types of instances that are eligible for the free tier in AWS EC2, aiding in cost-efficient resource allocation.
select instance_type, free_tier_eligiblefrom aws_ec2_instance_typewhere free_tier_eligible;
select instance_type, free_tier_eligiblefrom aws_ec2_instance_typewhere free_tier_eligible = 1;
Schema for aws_ec2_instance_type
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
auto_recovery_supported | boolean | Indicates whether auto recovery is supported. | |
bare_metal | boolean | Indicates whether the instance is a bare metal instance type. | |
burstable_performance_supported | boolean | Indicates whether the instance type is a burstable performance instance type. | |
current_generation | boolean | Indicates whether the instance type is current generation. | |
dedicated_hosts_supported | boolean | Indicates whether Dedicated Hosts are supported on the instance type. | |
ebs_info | jsonb | Describes the Amazon EBS settings for the instance type. | |
fpga_info | jsonb | Describes the FPGA accelerator settings for the instance type. | |
free_tier_eligible | boolean | Indicates whether the instance type is eligible for the free tier. | |
gpu_info | jsonb | Describes the GPU accelerator settings for the instance type. | |
hibernation_supported | boolean | Indicates whether On-Demand hibernation is supported. | |
hypervisor | text | The hypervisor for the instance type. | |
inference_accelerator_info | jsonb | Describes the Inference accelerator settings for the instance type. | |
instance_storage_info | jsonb | Describes the instance storage for the instance type. | |
instance_storage_supported | text | Describes the instance storage for the instance type. | |
instance_type | text | = | The instance type. For more information, see [ Instance Types ](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the Amazon Elastic Compute Cloud User Guide. |
location_type | text | Type of the location, for example: region, availability-zone, etc. | |
media_accelerator_info | jsonb | Describes the media accelerator settings for the instance type. | |
memory_info | jsonb | Describes the memory for the instance type. | |
network_info | jsonb | Describes the network settings for the instance type. | |
neuron_info | jsonb | Describes the Neuron accelerator settings for the instance type. | |
nitro_enclaves_support | text | Indicates whether Nitro Enclaves is supported. | |
nitro_tpm_info | jsonb | Describes the supported NitroTPM versions for the instance type. | |
nitro_tpm_support | text | Indicates whether NitroTPM is supported. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
placement_group_info | jsonb | Describes the placement group settings for the instance type. | |
processor_info | jsonb | Describes the processor. | |
region | text | = | The AWS Region in which the resource is located. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
supported_boot_modes | jsonb | The supported boot modes. | |
supported_root_device_types | jsonb | The supported root device types. | |
supported_usage_classes | jsonb | Indicates whether the instance type is offered for spot or On-Demand. | |
supported_virtualization_types | jsonb | The supported virtualization types. | |
title | text | Title of the resource. | |
v_cpu_info | jsonb | Describes the vCPU configurations for the instance type. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_ec2_instance_type