Open scanianick opened 4 years ago
The current way to work around this is to create an ebextension (e.g. .ebextensions/resources.config
) with the following contents:
Resources:
AWSEBAutoScalingGroup:
Type: "AWS::AutoScaling::AutoScalingGroup"
Properties:
MixedInstancesPolicy:
InstancesDistribution:
SpotAllocationStrategy: "lowest-price"
If you try to include this code for an environment that is not using a launch template, then the deployment will fail. So just keep that in mind.
@scanianick Elastic Beanstalk uses the new capacity-optimized allocation strategy for provisioning Spot instances. I'm curious if you prefer lowest-price to capacity-optimized and any particular requirements to change the allocation strategy?
@Sekhar-Kutikuppala yes, there are cases when "lowest-price" is the best strategy, e.g. cases when smallest reasonable instance type is fine, anything below it is too small and you add bigger instances only to be able to get your spot requests serve in time. It happens when you mostly rely on the smallest instance in the given family (g4dn.large could be the one).
Community Note
Tell us about your request What do you want us to build? Namespace available for "Spot Allocation Strategy".
Is this request specific to an Elastic Beanstalk platform? If so, which one(s)? No
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.
It would be great to have support for "Spot Allocation Strategy" for the ASG namespace.
Are you currently working around this issue? How are you currently solving this problem? Just selecting one instance type for spot instances instead of higher ends as well and fail over to ondemand instead.
Additional context Anything else we should know?
Attachments If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)