Skip to content

aws.ec2.get_instance_types_from_instance_requirements

Example SQL Queries

SELECT * FROM
aws.ec2.get_instance_types_from_instance_requirements
WHERE
"architecture_types" = 'VALUE'
AND "virtualization_types" = 'VALUE'
AND "instance_requirements" = 'VALUE';

Description

Returns a list of instance types with the specified instance attributes. You can use the response to preview the instance types without launching instances. Note that the response does not consider capacity.

When you specify multiple parameters, you get instance types that satisfy all of the specified parameters. If you specify multiple values for a parameter, you get instance types that satisfy any of the specified values.

For more information, see Preview instance types with specified attributes, Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot placement score in the Amazon EC2 User Guide, and Creating an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide.

Table Definition

Column NameColumn Data Type
architecture_types Required Input Column

The processor architecture type.

VARCHAR[]
Show child fields
architecture_types[]
instance_requirements Required Input Column

The attributes required for the instance types.

STRUCT(
"v_cpu_count" STRUCT(
"min" BIGINT,
"max" BIGINT
),
"memory_mi_b" STRUCT(
"min" BIGINT,
"max" BIGINT
),
"cpu_manufacturers" VARCHAR[],
"memory_gi_b_per_v_cpu" STRUCT(
"min" DOUBLE,
"max" DOUBLE
),
"excluded_instance_types" VARCHAR[],
"instance_generations" VARCHAR[],
"spot_max_price_percentage_over_lowest_price" BIGINT,
"on_demand_max_price_percentage_over_lowest_price" BIGINT,
"bare_metal" VARCHAR,
"burstable_performance" VARCHAR,
"require_hibernate_support" BOOLEAN,
"network_interface_count" STRUCT(
"min" BIGINT,
"max" BIGINT
),
"local_storage" VARCHAR,
"local_storage_types" VARCHAR[],
"total_local_storage_gb" STRUCT(
"min" DOUBLE,
"max" DOUBLE
),
"baseline_ebs_bandwidth_mbps" STRUCT(
"min" BIGINT,
"max" BIGINT
),
"accelerator_types" VARCHAR[],
"accelerator_count" STRUCT(
"min" BIGINT,
"max" BIGINT
),
"accelerator_manufacturers" VARCHAR[],
"accelerator_names" VARCHAR[],
"accelerator_total_memory_mi_b" STRUCT(
"min" BIGINT,
"max" BIGINT
),
"network_bandwidth_gbps" STRUCT(
"min" DOUBLE,
"max" DOUBLE
),
"allowed_instance_types" VARCHAR[],
"max_spot_price_as_percentage_of_optimal_on_demand_price" BIGINT
)
Show child fields
instance_requirements.accelerator_count

The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

To exclude accelerator-enabled instance types, set Max to 0.

Default: No minimum or maximum limits

Show child fields
instance_requirements.accelerator_count.max

The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0.

instance_requirements.accelerator_count.min

The minimum number of accelerators. To specify no minimum limit, omit this parameter.

instance_requirements.accelerator_manufacturers[]
instance_requirements.accelerator_names[]
instance_requirements.accelerator_total_memory_mi_b

The minimum and maximum amount of total accelerator memory, in MiB.

Default: No minimum or maximum limits

Show child fields
instance_requirements.accelerator_total_memory_mi_b.max

The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

instance_requirements.accelerator_total_memory_mi_b.min

The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

instance_requirements.accelerator_types[]
instance_requirements.allowed_instance_types[]
instance_requirements.bare_metal

Indicates whether bare metal instance types must be included, excluded, or required.

  • To include bare metal instance types, specify included.

  • To require only bare metal instance types, specify required.

  • To exclude bare metal instance types, specify excluded.

Default: excluded

instance_requirements.baseline_ebs_bandwidth_mbps

The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.

Default: No minimum or maximum limits

Show child fields
instance_requirements.baseline_ebs_bandwidth_mbps.max

The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

instance_requirements.baseline_ebs_bandwidth_mbps.min

The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

instance_requirements.burstable_performance

Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances.

  • To include burstable performance instance types, specify included.

  • To require only burstable performance instance types, specify required.

  • To exclude burstable performance instance types, specify excluded.

Default: excluded

instance_requirements.cpu_manufacturers[]
instance_requirements.excluded_instance_types[]
instance_requirements.instance_generations[]
instance_requirements.local_storage

Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide.

  • To include instance types with instance store volumes, specify included.

  • To require only instance types with instance store volumes, specify required.

  • To exclude instance types with instance store volumes, specify excluded.

Default: included

instance_requirements.local_storage_types[]
instance_requirements.max_spot_price_as_percentage_of_optimal_on_demand_price

[Price protection] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.

The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

If you set TargetCapacityUnitType to vcpu or memory-mib, the price protection threshold is based on the per vCPU or per memory price instead of the per instance price.

Only one of SpotMaxPricePercentageOverLowestPrice or MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as 999999.

instance_requirements.memory_gi_b_per_v_cpu

The minimum and maximum amount of memory per vCPU, in GiB.

Default: No minimum or maximum limits

Show child fields
instance_requirements.memory_gi_b_per_v_cpu.max

The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

instance_requirements.memory_gi_b_per_v_cpu.min

The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

instance_requirements.memory_mi_b

The minimum and maximum amount of memory, in MiB.

Show child fields
instance_requirements.memory_mi_b.max

The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

instance_requirements.memory_mi_b.min

The minimum amount of memory, in MiB. To specify no minimum limit, specify 0.

instance_requirements.network_bandwidth_gbps

The minimum and maximum amount of baseline network bandwidth, in gigabits per second (Gbps). For more information, see Amazon EC2 instance network bandwidth in the Amazon EC2 User Guide.

Default: No minimum or maximum limits

Show child fields
instance_requirements.network_bandwidth_gbps.max

The maximum amount of network bandwidth, in Gbps. To specify no maximum limit, omit this parameter.

instance_requirements.network_bandwidth_gbps.min

The minimum amount of network bandwidth, in Gbps. To specify no minimum limit, omit this parameter.

instance_requirements.network_interface_count

The minimum and maximum number of network interfaces.

Default: No minimum or maximum limits

Show child fields
instance_requirements.network_interface_count.max

The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

instance_requirements.network_interface_count.min

The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

instance_requirements.on_demand_max_price_percentage_over_lowest_price

[Price protection] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.

The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

To indicate no price protection threshold, specify a high value, such as 999999.

This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

If you set TargetCapacityUnitType to vcpu or memory-mib, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

Default: 20

instance_requirements.require_hibernate_support

Indicates whether instance types must support hibernation for On-Demand Instances.

This parameter is not supported for GetSpotPlacementScores.

Default: false

instance_requirements.spot_max_price_percentage_over_lowest_price

[Price protection] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price. The identified Spot price is the Spot price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified Spot price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose Spot price exceeds your specified threshold.

The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

If you set TargetCapacityUnitType to vcpu or memory-mib, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements.

Only one of SpotMaxPricePercentageOverLowestPrice or MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as 999999.

Default: 100

instance_requirements.total_local_storage_gb

The minimum and maximum amount of total local storage, in GB.

Default: No minimum or maximum limits

Show child fields
instance_requirements.total_local_storage_gb.max

The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

instance_requirements.total_local_storage_gb.min

The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

instance_requirements.v_cpu_count

The minimum and maximum number of vCPUs.

Show child fields
instance_requirements.v_cpu_count.max

The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

instance_requirements.v_cpu_count.min

The minimum number of vCPUs. To specify no minimum limit, specify 0.

virtualization_types Required Input Column

The virtualization type.

VARCHAR[]
Show child fields
virtualization_types[]
dry_run Input Column

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

BOOLEAN
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
instance_type

The matching instance type.

VARCHAR