PlacementGroupStrategy Enum
Which strategy to use when launching instances.
Example
ts
declare const instanceType: ec2.InstanceType;
const pg = new ec2.PlacementGroup(this, 'test-pg', {
strategy: ec2.PlacementGroupStrategy.SPREAD,
});
new ec2.Instance(this, 'Instance', {
vpc,
instanceType,
machineImage: ec2.MachineImage.latestAmazonLinux2023(),
placementGroup: pg,
});
Members
| Member | Description |
|---|---|
CLUSTER | Packs instances close together inside an Availability Zone. |
PARTITION | Spreads your instances across logical partitions such that groups of instances in one partition do not share the underlying hardware with groups of instances in different partitions. |
SPREAD | Strictly places a small group of instances across distinct underlying hardware to reduce correlated failures. |
Referenced by
IPlacementGroup.strategystrategystrategyStrategyStrategyPlacementGroup.strategystrategystrategyStrategyStrategyPlacementGroupProps.strategystrategystrategyStrategyStrategy