Skip to content
v2.275.0

FleetLaunchTemplateConfigRequestProperty Struct ​

Specifies a launch template and overrides for an EC2 Fleet.

FleetLaunchTemplateConfigRequest is a property of the AWS::EC2::EC2Fleet resource.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const fleetLaunchTemplateConfigRequestProperty: ec2.CfnEC2Fleet.FleetLaunchTemplateConfigRequestProperty = {
  launchTemplateSpecification: {
    version: 'version',

    // the properties below are optional
    launchTemplateId: 'launchTemplateId',
    launchTemplateName: 'launchTemplateName',
    launchTemplateSpecificationUserData: 'launchTemplateSpecificationUserData',
  },
  overrides: [{
    availabilityZone: 'availabilityZone',
    availabilityZoneId: 'availabilityZoneId',
    blockDeviceMappings: [{
      deviceName: 'deviceName',
      ebs: {
        deleteOnTermination: false,
        encrypted: false,
        iops: 123,
        kmsKeyId: 'kmsKeyId',
        multiAvailabilityZoneConfiguration: {
          configurationType: 'configurationType',
          standbyAvailabilityZones: [{
            availabilityZone: 'availabilityZone',
            availabilityZoneId: 'availabilityZoneId',
          }],
        },
        snapshotId: 'snapshotId',
        volumeSize: 123,
        volumeType: 'volumeType',
      },
      noDevice: 'noDevice',
      virtualName: 'virtualName',
    }],
    iamInstanceProfile: {
      arn: 'arn',
      name: 'name',
    },
    instanceRequirements: {
      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,
      },
      baselinePerformanceFactors: {
        cpu: {
          references: [{
            instanceFamily: 'instanceFamily',
          }],
        },
      },
      burstablePerformance: 'burstablePerformance',
      cpuManufacturers: ['cpuManufacturers'],
      excludedInstanceTypes: ['excludedInstanceTypes'],
      instanceGenerations: ['instanceGenerations'],
      localStorage: 'localStorage',
      localStorageTypes: ['localStorageTypes'],
      maxSpotPriceAsPercentageOfOptimalOnDemandPrice: 123,
      memoryGiBPerVCpu: {
        max: 123,
        min: 123,
      },
      memoryMiB: {
        max: 123,
        min: 123,
      },
      networkBandwidthGbps: {
        max: 123,
        min: 123,
      },
      networkInterfaceCount: {
        max: 123,
        min: 123,
      },
      onDemandMaxPricePercentageOverLowestPrice: 123,
      requireEncryptionInTransit: false,
      requireHibernateSupport: false,
      spotMaxPricePercentageOverLowestPrice: 123,
      totalLocalStorageGb: {
        max: 123,
        min: 123,
      },
      vCpuCount: {
        max: 123,
        min: 123,
      },
    },
    instanceType: 'instanceType',
    keyName: 'keyName',
    maxPrice: 'maxPrice',
    metadataOptions: {
      httpEndpoint: 'httpEndpoint',
      httpPutResponseHopLimit: 123,
      httpTokens: 'httpTokens',
    },
    networkInterfaces: [{
      associatePublicIpAddress: false,
      deleteOnTermination: false,
      description: 'description',
      deviceIndex: 123,
      groups: ['groups'],
      interfaceType: 'interfaceType',
      ipv6AddressCount: 123,
      ipv6Addresses: [{
        ipv6Address: 'ipv6Address',
      }],
      networkCardIndex: 123,
      networkInterfaceId: 'networkInterfaceId',
      privateIpAddress: 'privateIpAddress',
      privateIpAddresses: [{
        primary: false,
        privateIpAddress: 'privateIpAddress',
      }],
      secondaryPrivateIpAddressCount: 123,
      subnetId: 'subnetId',
    }],
    placement: {
      affinity: 'affinity',
      availabilityZone: 'availabilityZone',
      groupName: 'groupName',
      hostId: 'hostId',
      hostResourceGroupArn: 'hostResourceGroupArn',
      partitionNumber: 123,
      spreadDomain: 'spreadDomain',
      tenancy: 'tenancy',
    },
    priority: 123,
    subnetId: 'subnetId',
    weightedCapacity: 123,
  }],
};

Properties ​

launchTemplateSpecificationoptionalIResolvable | CfnEC2Fleet.FleetLaunchTemplateSpecificationRequestPropertylaunch_template_specificationoptionaltyping.Union[IResolvable, FleetLaunchTemplateSpecificationRequestProperty]launchTemplateSpecificationoptionalIResolvableLaunchTemplateSpecificationoptionalIResolvableLaunchTemplateSpecificationoptionalinterface{}#
The launch template to use.

You must specify either the launch template ID or launch template name in the request.

overridesoptionalIResolvable | IResolvable | CfnEC2Fleet.FleetLaunchTemplateOverridesRequestProperty[]overridesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, FleetLaunchTemplateOverridesRequestProperty]]]overridesoptionalIResolvableOverridesoptionalIResolvableOverridesoptionalinterface{}#
Any parameters that you specify override the same parameters in the launch template.

For fleets of type request and maintain , a maximum of 300 items is allowed across all launch templates.