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

aws-autoscaling: OnDemandAllocationStrategy enum does not support lowest-price #28395

Closed
bwagner5 opened this issue Dec 16, 2023 · 2 comments · Fixed by #28396
Closed

aws-autoscaling: OnDemandAllocationStrategy enum does not support lowest-price #28395

bwagner5 opened this issue Dec 16, 2023 · 2 comments · Fixed by #28396
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@bwagner5
Copy link
Contributor

Describe the bug

AWS AutoScaling OnDemandAllocationStrategy enum for Mixed Instance Policy does not support lowest-price, only prioritized.

ASG supports both: https://docs.aws.amazon.com/autoscaling/ec2/userguide/allocation-strategies.html#on-demand-allocation-strategy

Expected Behavior

OnDemandAllocationStrategy should support both prioritized and lowest-price

Current Behavior

OnDemandAllocationStrategy only supports prioritized and NOT lowest-price

Reproduction Steps

export enum OnDemandAllocationStrategy {
/**
* This strategy uses the order of instance types in the LaunchTemplateOverrides to define the launch
* priority of each instance type. The first instance type in the array is prioritized higher than the
* last. If all your On-Demand capacity cannot be fulfilled using your highest priority instance, then
* the Auto Scaling group launches the remaining capacity using the second priority instance type, and
* so on.
*/
PRIORITIZED = 'prioritized',
}

Possible Solution

Add lowest-price enum

Additional Information/Context

No response

CDK CLI Version

2.106.0

Framework Version

No response

Node.js Version

21.1.0

OS

Mac M1 14.2

Language

TypeScript

Language Version

No response

Other information

No response

@bwagner5 bwagner5 added bug This issue is a bug. 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
@pahud
Copy link
Contributor

pahud commented Dec 18, 2023

Awesome! Thank you for your PR!

@pahud pahud 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
@mergify mergify bot closed this as completed in #28396 Dec 18, 2023
mergify bot pushed a commit that referenced this issue Dec 18, 2023
…to aws-autoscaling (#28396)

Closes #28395

Adds the On-Demand `lowest-price` allocation strategy enum for aws-autoscaling. 

https://docs.aws.amazon.com/autoscaling/ec2/userguide/allocation-strategies.html#on-demand-allocation-strategy

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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.

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 bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
2 participants