Enum PlacementGroupStrategy
Which strategy to use when launching instances.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public enum PlacementGroupStrategy
Syntax (vb)
Public Enum PlacementGroupStrategy
Remarks
ExampleMetadata: fixture=with-vpc infused
Examples
InstanceType instanceType;
var pg = new PlacementGroup(this, "test-pg", new PlacementGroupProps {
Strategy = PlacementGroupStrategy.SPREAD
});
new Instance(this, "Instance", new InstanceProps {
Vpc = vpc,
InstanceType = instanceType,
MachineImage = MachineImage.LatestAmazonLinux2023(),
PlacementGroup = pg
});
Synopsis
Fields
| 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. |
Fields
| Name | 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. |