Skip to content

aws-eks: AutoScalingGroupCapacityOptions - support MixedInstancesPolicy #35732

@chancepants

Description

@chancepants

Describe the feature

Add MixedInstancesPolicy as an optional parameter to the AutoScalingGroupCapacityOptions interface. Update validation logic to address incompatible arguments.

Use Case

I am unable to specify multiple instance types for my EKS self managed capacity created via cluster.addAutoScalingGroupCapacity. This can be accomplished by specifying multiple instance types in a MixedInstancesPolicy.

Proposed Solution

Add a new optional parameter MixedInstancesPolicy to the AutoScalingGroupCapacityOptions interface. Make instanceType an optional field. Adjust validation logic to handle cases where certain fields cannot be specified alongside MixedInstancesPolicy. The validation will be similar to what is done in the EKS NodeGroup constructor https://github.com/aws/aws-cdk/blob/v2.219.0/packages/aws-cdk-lib/aws-eks/lib/managed-nodegroup.ts#L389

Other Information

No response

Acknowledgements

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

AWS CDK Library version (aws-cdk-lib)

[email protected]

AWS CDK CLI version

2.1030.0

Environment details (OS name and version, etc.)

MacOS Sequoia 15.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eksRelated to Amazon Elastic Kubernetes Servicefeature-requestA feature should be added or improved.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions