AutoScalingGroupLTProps

@cosmos-building-blocks/serviceGlobalsAutoScalingGroupLTProps

Properties for AutoScalingGroupLT

Hierarchy

  • AutoScalingGroupProps

    AutoScalingGroupLTProps

Index

Properties

Properties

Readonly instanceType

instanceType: InstanceType

Overrides void

Defined in packages/@cosmos-building-blocks/service/src/autoscaling.ts:29

Type of instance to launch. if used with useInstanceTemplate = true, it will be applied to LaunchTemplate. Make sure to check and tweak launchTemplateOverrides and instancesDistribution as the default values set for those properties will overwrite this InstanceType


Optional Readonly instancesDistribution

instancesDistribution? : Partial‹InstancesDistributionProperty›

Defined in packages/@cosmos-building-blocks/service/src/autoscaling.ts:57

Can only be used along with useInstanceTemplate = true. Specifies the distribution of On-Demand Instances and Spot Instances, the maximum price to pay for Spot Instances, and how the Auto Scaling group allocates instance types to fulfill On-Demand and Spot capacity. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancesdistribution.html

default - Uses all Spot instances of types specified in property launchTemplateOverrides { onDemandAllocationStrategy: "prioritized", onDemandBaseCapacity: 0, onDemandPercentageAboveBaseCapacity: 0, spotAllocationStrategy: "capacity-optimized", spotMaxPrice: props.spotPrice, }


Optional Readonly launchTemplateOverrides

launchTemplateOverrides? : Array‹LaunchTemplateOverridesProperty›

Defined in packages/@cosmos-building-blocks/service/src/autoscaling.ts:41

Can only be used along with useInstanceTemplate = true. Array of LaunchTemplateOverridesProperty which is a subproperty of LaunchTemplate that describes an override for a launch template. Currently, the only supported override is instance type https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html

default [{ instanceType: "t3.medium" }, { instanceType: "t3.small" }]

This will use any Spot instances available, "t3.medium" or "t3.small" based on spotAllocationStrategy set in instancesDistribution


Optional Readonly useInstanceTemplate

useInstanceTemplate? : undefined | false | true

Defined in packages/@cosmos-building-blocks/service/src/autoscaling.ts:23

Set this to true if you want to use Instance Template instead of Launch Config. You can fine tune your default LaunchTemplate with instanceType, launchTemplateOverrides and instancesDistribution

default - false