InstanceRequirementsRequest - Amazon Elastic Container Service

InstanceRequirementsRequest

The instance requirements for attribute-based instance type selection. Instead of specifying exact instance types, you define requirements such as vCPU count, memory size, network performance, and accelerator specifications. Amazon ECS automatically selects Amazon EC2 instance types that match these requirements, providing flexibility and helping to mitigate capacity constraints.

Contents

memoryMiB

The minimum and maximum amount of memory in mebibytes (MiB) for the instance types. Amazon ECS selects instance types that have memory within this range.

Type: MemoryMiBRequest object

Required: Yes

vCpuCount

The minimum and maximum number of vCPUs for the instance types. Amazon ECS selects instance types that have vCPU counts within this range.

Type: VCpuCountRangeRequest object

Required: Yes

acceleratorCount

The minimum and maximum number of accelerators for the instance types. This is used when you need instances with specific numbers of GPUs or other accelerators.

Type: AcceleratorCountRequest object

Required: No

acceleratorManufacturers

The accelerator manufacturers to include. You can specify nvidia, amd, amazon-web-services, or xilinx depending on your accelerator requirements.

Type: Array of strings

Valid Values: amazon-web-services | amd | nvidia | xilinx | habana

Required: No

acceleratorNames

The specific accelerator names to include. For example, you can specify a100, v100, k80, or other specific accelerator models.

Type: Array of strings

Valid Values: a100 | inferentia | k520 | k80 | m60 | radeon-pro-v520 | t4 | vu9p | v100 | a10g | h100 | t4g

Required: No

acceleratorTotalMemoryMiB

The minimum and maximum total accelerator memory in mebibytes (MiB). This is important for GPU workloads that require specific amounts of video memory.

Type: AcceleratorTotalMemoryMiBRequest object

Required: No

acceleratorTypes

The accelerator types to include. You can specify gpu for graphics processing units, fpga for field programmable gate arrays, or inference for machine learning inference accelerators.

Type: Array of strings

Valid Values: gpu | fpga | inference

Required: No

allowedInstanceTypes

The instance types to include in the selection. When specified, Amazon ECS only considers these instance types, subject to the other requirements specified.

Type: Array of strings

Array Members: Maximum number of 400 items.

Length Constraints: Minimum length of 1. Maximum length of 30.

Pattern: [a-zA-Z0-9\.\*\-]+

Required: No

bareMetal

Indicates whether to include bare metal instance types. Set to included to allow bare metal instances, excluded to exclude them, or required to use only bare metal instances.

Type: String

Valid Values: included | required | excluded

Required: No

baselineEbsBandwidthMbps

The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps). This is important for workloads with high storage I/O requirements.

Type: BaselineEbsBandwidthMbpsRequest object

Required: No

burstablePerformance

Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g). Set to included to allow burstable instances, excluded to exclude them, or required to use only burstable instances.

Type: String

Valid Values: included | required | excluded

Required: No

cpuManufacturers

The CPU manufacturers to include or exclude. You can specify intel, amd, or amazon-web-services to control which CPU types are used for your workloads.

Type: Array of strings

Valid Values: intel | amd | amazon-web-services

Required: No

excludedInstanceTypes

The instance types to exclude from selection. Use this to prevent Amazon ECS from selecting specific instance types that may not be suitable for your workloads.

Type: Array of strings

Array Members: Maximum number of 400 items.

Length Constraints: Minimum length of 1. Maximum length of 30.

Pattern: [a-zA-Z0-9\.\*\-]+

Required: No

instanceGenerations

The instance generations to include. You can specify current to use the latest generation instances, or previous to include previous generation instances for cost optimization.

Type: Array of strings

Valid Values: current | previous

Required: No

localStorage

Indicates whether to include instance types with local storage. Set to included to allow local storage, excluded to exclude it, or required to use only instances with local storage.

Type: String

Valid Values: included | required | excluded

Required: No

localStorageTypes

The local storage types to include. You can specify hdd for hard disk drives, ssd for solid state drives, or both.

Type: Array of strings

Valid Values: hdd | ssd

Required: No

maxSpotPriceAsPercentageOfOptimalOnDemandPrice

The maximum price for Spot instances as a percentage of the optimal On-Demand price. This provides more precise cost control for Spot instance selection.

Type: Integer

Required: No

memoryGiBPerVCpu

The minimum and maximum amount of memory per vCPU in gibibytes (GiB). This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.

Type: MemoryGiBPerVCpuRequest object

Required: No

networkBandwidthGbps

The minimum and maximum network bandwidth in gigabits per second (Gbps). This is crucial for network-intensive workloads that require high throughput.

Type: NetworkBandwidthGbpsRequest object

Required: No

networkInterfaceCount

The minimum and maximum number of network interfaces for the instance types. This is useful for workloads that require multiple network interfaces.

Type: NetworkInterfaceCountRequest object

Required: No

onDemandMaxPricePercentageOverLowestPrice

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. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon ECS selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.

Type: Integer

Required: No

requireHibernateSupport

Indicates whether the instance types must support hibernation. When set to true, only instance types that support hibernation are selected.

Type: Boolean

Required: No

spotMaxPricePercentageOverLowestPrice

The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance. This helps control Spot instance costs while maintaining access to capacity.

Type: Integer

Required: No

totalLocalStorageGB

The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.

Type: TotalLocalStorageGBRequest object

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: