interface ManagedInstancesProviderProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECS.CfnCapacityProvider.ManagedInstancesProviderProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#CfnCapacityProvider_ManagedInstancesProviderProperty |
Java | software.amazon.awscdk.services.ecs.CfnCapacityProvider.ManagedInstancesProviderProperty |
Python | aws_cdk.aws_ecs.CfnCapacityProvider.ManagedInstancesProviderProperty |
TypeScript | aws-cdk-lib » aws_ecs » CfnCapacityProvider » ManagedInstancesProviderProperty |
The configuration for a Amazon ECS Managed Instances provider.
Amazon ECS uses this configuration to automatically launch, manage, and terminate Amazon EC2 instances on your behalf. Managed instances provide access to the full range of Amazon EC2 instance types and features while offloading infrastructure management to AWS .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const managedInstancesProviderProperty: ecs.CfnCapacityProvider.ManagedInstancesProviderProperty = {
infrastructureRoleArn: 'infrastructureRoleArn',
instanceLaunchTemplate: {
ec2InstanceProfileArn: 'ec2InstanceProfileArn',
networkConfiguration: {
subnets: ['subnets'],
// the properties below are optional
securityGroups: ['securityGroups'],
},
// the properties below are optional
instanceRequirements: {
memoryMiB: {
min: 123,
// the properties below are optional
max: 123,
},
vCpuCount: {
min: 123,
// the properties below are optional
max: 123,
},
// the properties below are optional
acceleratorCount: {
max: 123,
min: 123,
},
acceleratorManufacturers: ['acceleratorManufacturers'],
acceleratorNames: ['acceleratorNames'],
acceleratorTotalMemoryMiB: {
max: 123,
min: 123,
},
acceleratorTypes: ['acceleratorTypes'],
allowedInstanceTypes: ['allowedInstanceTypes'],
bareMetal: 'bareMetal',
baselineEbsBandwidthMbps: {
max: 123,
min: 123,
},
burstablePerformance: 'burstablePerformance',
cpuManufacturers: ['cpuManufacturers'],
excludedInstanceTypes: ['excludedInstanceTypes'],
instanceGenerations: ['instanceGenerations'],
localStorage: 'localStorage',
localStorageTypes: ['localStorageTypes'],
maxSpotPriceAsPercentageOfOptimalOnDemandPrice: 123,
memoryGiBPerVCpu: {
max: 123,
min: 123,
},
networkBandwidthGbps: {
max: 123,
min: 123,
},
networkInterfaceCount: {
max: 123,
min: 123,
},
onDemandMaxPricePercentageOverLowestPrice: 123,
requireHibernateSupport: false,
spotMaxPricePercentageOverLowestPrice: 123,
totalLocalStorageGb: {
max: 123,
min: 123,
},
},
monitoring: 'monitoring',
storageConfiguration: {
storageSizeGiB: 123,
},
},
// the properties below are optional
infrastructureOptimization: {
scaleInAfter: 123,
},
propagateTags: 'propagateTags',
};
Properties
| Name | Type | Description |
|---|---|---|
| infrastructure | string | The Amazon Resource Name (ARN) of the infrastructure role that Amazon ECS assumes to manage instances. |
| instance | IResolvable | Instance | The launch template that defines how Amazon ECS launches Amazon ECS Managed Instances. |
| infrastructure | IResolvable | Infrastructure | Defines how Amazon ECS Managed Instances optimizes the infrastructure in your capacity provider. |
| propagate | string | Determines whether tags from the capacity provider are automatically applied to Amazon ECS Managed Instances. |
infrastructureRoleArn
Type:
string
The Amazon Resource Name (ARN) of the infrastructure role that Amazon ECS assumes to manage instances.
This role must include permissions for Amazon EC2 instance lifecycle management, networking, and any additional AWS services required for your workloads.
For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide .
instanceLaunchTemplate
Type:
IResolvable | Instance
The launch template that defines how Amazon ECS launches Amazon ECS Managed Instances.
This includes the instance profile for your tasks, network and storage configuration, and instance requirements that determine which Amazon EC2 instance types can be used.
For more information, see Store instance launch parameters in Amazon EC2 launch templates in the Amazon EC2 User Guide .
infrastructureOptimization?
Type:
IResolvable | Infrastructure
(optional)
Defines how Amazon ECS Managed Instances optimizes the infrastructure in your capacity provider.
Configure it to turn on or off the infrastructure optimization in your capacity provider, and to control the idle EC2 instances optimization delay.
propagateTags?
Type:
string
(optional)
Determines whether tags from the capacity provider are automatically applied to Amazon ECS Managed Instances.
This helps with cost allocation and resource management by ensuring consistent tagging across your infrastructure.

.NET
Go
Java
Python
TypeScript