AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::PlacementGroup

CfnPlacementGroup

Specifies a placement group in which to launch instances. The strategy of the placement group determines how the instances are organized within the group. A `cluster` placement group is a logical grouping of instances within a single Availability Zone that benefit from low network latency, high network throughput. A `spread` placement group places instances on distinct hardware. A `partition` placement group places groups of instances in different partitions, where instances in one partition do not share the same hardware with instances in another partition. For more information, see [Placement Groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in the *Amazon EC2 User Guide* .

Import

import { CfnPlacementGroup } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnPlacementGroup

Properties

Configuration passed to the constructor as CfnPlacementGroupProps.

partitionCountOptional
number

The number of partitions. Valid only when *Strategy* is set to `partition` .

spreadLevelOptional
string

Determines how placement groups spread instances. - Host – You can use `host` only with Outpost placement groups. - Rack – No usage restrictions.

strategyOptional
string

The placement strategy.

tagsOptional
CfnTag[]

The tags to apply to the new placement group.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic