ManagedInstancesProviderProperty Struct
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: {
securityGroups: ['securityGroups'],
subnets: ['subnets'],
},
// the properties below are optional
capacityOptionType: 'capacityOptionType',
capacityReservations: {
reservationGroupArn: 'reservationGroupArn',
reservationPreference: 'reservationPreference',
},
fipsEnabled: false,
instanceMetadataTagsPropagation: false,
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,
},
},
localStorageConfiguration: {
useLocalStorage: false,
},
monitoring: 'monitoring',
storageConfiguration: {
storageSizeGiB: 123,
},
},
// the properties below are optional
autoRepairConfiguration: {
actionsStatus: 'actionsStatus',
},
infrastructureOptimization: {
scaleInAfter: 123,
},
propagateTags: 'propagateTags',
};
Properties
autoRepairConfigurationIResolvable | CfnCapacityProvider.AutoRepairConfigurationPropertyauto_repair_configurationtyping.Union[IResolvable, AutoRepairConfigurationProperty]autoRepairConfigurationIResolvableAutoRepairConfigurationIResolvableAutoRepairConfigurationinterface{}#infrastructureOptimizationIResolvable | CfnCapacityProvider.InfrastructureOptimizationPropertyinfrastructure_optimizationtyping.Union[IResolvable, InfrastructureOptimizationProperty]infrastructureOptimizationIResolvableInfrastructureOptimizationIResolvableInfrastructureOptimizationinterface{}#Configure it to turn on or off the infrastructure optimization in your capacity provider, and to control the idle or underutilized EC2 instances optimization delay.
infrastructureRoleArnstringinfrastructure_role_arnstrinfrastructureRoleArnStringInfrastructureRoleArnstringInfrastructureRoleArn*stringrequired#notes
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 .
instanceLaunchTemplateIResolvable | CfnCapacityProvider.InstanceLaunchTemplatePropertyinstance_launch_templatetyping.Union[IResolvable, InstanceLaunchTemplateProperty]instanceLaunchTemplateIResolvableInstanceLaunchTemplateIResolvableInstanceLaunchTemplateinterface{}required#notes
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 .
This helps with cost allocation and resource management by ensuring consistent tagging across your infrastructure.