Reputation: 6494
I regularly am seeing the following througout various AWS documentation:
If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.
Most importantly, I see it on the create-launch-template documentation.
I would like to create a launch configuration for an auto-scaling group that will use a variety of instance types based on their attribute-based selection.
This will of course, allow me to use a number of various instance types - making my spot request more eligible for being fulfilled and have less interruptions.
I've found that I'm able to set a maximum price defined as "Per instance/hour" - but if I'm using a variety of instances which have a slew of different pricing, this of course breaks down.
For this reason - The request-spot-fleet API call has a means of setting a TargetCapacityUnitType
so that you're able to define a maximum price based on vCPU or memory instead.
It seems like all the pieces are here - and the aforementioned 'Note' is even on the create-launch-template
documentation; but I cannot find where to actually define TargetCapacityUnitType
in my Launch Configuration.
When creating an AWS Auto-Scaling Launch Configuration & using spot instances - How can I set a maximum price based on unit type? Is this possible?
Upvotes: 0
Views: 284
Reputation: 1
You can set up a launch template with your AMI and then use the launch template to create the group. You don't use a launch configuration at all.
All properties you specify for attribute-based instance type selection are part of a mixed instances policy, which is part of the create-auto-scaling-group call.
Upvotes: 0