steampipe plugin install aws

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_supported
from
aws_ec2_instance_type
where
dedicated_hosts_supported;
select
instance_type,
dedicated_hosts_supported
from
aws_ec2_instance_type
where
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_supported
from
aws_ec2_instance_type
where
not auto_recovery_supported;
select
instance_type,
auto_recovery_supported
from
aws_ec2_instance_type
where
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_core
from
aws_ec2_instance_type
where
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_core
from
aws_ec2_instance_type
where
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_support
from
aws_ec2_instance_type
where
ebs_info ->> 'EncryptionSupport' = 'unsupported';
select
instance_type,
json_extract(ebs_info, '$.EncryptionSupport') as encryption_support
from
aws_ec2_instance_type
where
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_eligible
from
aws_ec2_instance_type
where
free_tier_eligible;
select
instance_type,
free_tier_eligible
from
aws_ec2_instance_type
where
free_tier_eligible = 1;

Schema for aws_ec2_instance_type

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
auto_recovery_supportedbooleanIndicates whether auto recovery is supported.
bare_metalbooleanIndicates whether the instance is a bare metal instance type.
burstable_performance_supportedbooleanIndicates whether the instance type is a burstable performance instance type.
current_generationbooleanIndicates whether the instance type is current generation.
dedicated_hosts_supportedbooleanIndicates whether Dedicated Hosts are supported on the instance type.
ebs_infojsonbDescribes the Amazon EBS settings for the instance type.
free_tier_eligiblebooleanIndicates whether the instance type is eligible for the free tier.
gpu_infojsonbDescribes the GPU accelerator settings for the instance type.
hibernation_supportedbooleanIndicates whether On-Demand hibernation is supported.
hypervisortextThe hypervisor for the instance type.
instance_storage_supportedtextDescribes the instance storage for the instance type.
instance_typetext=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.
memory_infojsonbDescribes the memory for the instance type.
network_infojsonbDescribes the network settings for the instance type.
placement_group_infojsonbDescribes the placement group settings for the instance type.
processor_infojsonbDescribes the processor.
supported_root_device_typesjsonbThe supported root device types.
supported_usage_classesjsonbIndicates whether the instance type is offered for spot or On-Demand.
supported_virtualization_typesjsonbThe supported virtualization types.
titletextTitle of the resource.
v_cpu_infojsonbDescribes 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