Skip to content

aws-ec2: Support PlacementGroup in LaunchTemplate #33721

@clayrosenthal

Description

@clayrosenthal

Describe the feature

You should be able to pass a PlacementGroup construct to the LaunchTemplate construct to make the instances launched with that template use that placement group.

Use Case

When you define a PlacementGroup and want to create a LaunchTemplate that uses it, you have to use the L1 CfnLaunchTemplate or do some weird half and half of creating an L2 LaunchTemplate then casting it as the L1 to edit the corresponding property.

Proposed Solution

Allow for an optional placementGroup prop that implements IPlacementGroup in LaunchTemplateProps

Other Information

The Instance construct already supports such a prop

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.178.2

Environment details (OS name and version, etc.)

macOS 15.3.1 (24D70)

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ec2Related to Amazon Elastic Compute Cloudeffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions