Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoScalingGroup: LaunchTemplateOverrides is missing the InstanceRequirements Attribute in AWS CDK L2 construct #28393

Closed
1 of 2 tasks
ayush-shah-1501 opened this issue Dec 16, 2023 · 5 comments · Fixed by #28464
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@ayush-shah-1501
Copy link
Contributor

ayush-shah-1501 commented Dec 16, 2023

Describe the feature

The LaunchTemplateOverridesProperty is a crucial feature for our use case as it allows us to specify CPU, and memory configurations on a per-instance basis within the Auto Scaling Group and define spot and on-deamnd instances capcaity percentage. While this functionality is available in the L1 construct, it seems to be missing in the L2 construct.

Use Case

We expect the L2 construct (AutoScalingGroup) to provide support for the LaunchTemplateOverridesProperty, enabling us to define specific configurations (such as min and max CPU and memory) and spot and on-demand capacity percentage within the Auto Scaling Group.

Proposed Solution

We propose extending the L2 AutoScalingGroup construct to include support for the LaunchTemplateOverridesProperty or providing an alternative mechanism to achieve per-instance configuration within the Auto Scaling Group.

Other Information

No response

Acknowledgements

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

CDK version used

2.100.0

Environment details (OS name and version, etc.)

ubuntu

@ayush-shah-1501 ayush-shah-1501 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 16, 2023
@github-actions github-actions bot added the @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling label Dec 16, 2023
@lpizzinidev
Copy link
Contributor

This feature is currently supported, you can use the launchTemplateOverrides property.
Please take a look at the docs for an example implementation.

@ayush-shah-1501
Copy link
Contributor Author

ayush-shah-1501 commented Dec 16, 2023

@lpizzinidev I don't want to specify multiple instances; I want to provide minimum and maximum values for CPU and memory, and based on that, all possible instances should be selected.

Please look into the cdk L1 constrct docs this feature is missing from L2 construct

@lpizzinidev
Copy link
Contributor

@ayush-shah-1501
Thanks for the follow-up.
Basically LaunchTemplateOverrides for L2 construct is missing the InstanceRequirements attribute.

@ayush-shah-1501 ayush-shah-1501 changed the title AutoScalingGroup: LaunchTemplateOverridesProperty is not supported in AWS CDK L2 construct AutoScalingGroup: LaunchTemplateOverrides is missing the InstanceRequirements Attribute in AWS CDK L2 construct Dec 18, 2023
@khushail khushail added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Dec 18, 2023
@khushail
Copy link
Contributor

Thanks @ayush-shah-1501 for submitting this request. Community contributions are welcome in this regard.

sumupitchayan added a commit that referenced this issue Dec 28, 2023
…28464)

Closes #28393

> Basically
[LaunchTemplateOverrides](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_autoscaling.LaunchTemplateOverrides.html)
for L2 construct is missing the
[InstanceRequirements](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancerequirements)
attribute.

----

*By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license*

---------

Co-authored-by: Sumu Pitchayan <35242245+sumupitchayan@users.noreply.github.com>
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

paulhcsun pushed a commit to paulhcsun/aws-cdk that referenced this issue Jan 5, 2024
…ws#28464)

Closes aws#28393

> Basically
[LaunchTemplateOverrides](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_autoscaling.LaunchTemplateOverrides.html)
for L2 construct is missing the
[InstanceRequirements](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancerequirements)
attribute.

----

*By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license*

---------

Co-authored-by: Sumu Pitchayan <35242245+sumupitchayan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants