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

Add PurchasingOption: spot-with-timeout-to-on-demand #17

Open
elgalu opened this issue Nov 2, 2020 · 1 comment
Open

Add PurchasingOption: spot-with-timeout-to-on-demand #17

elgalu opened this issue Nov 2, 2020 · 1 comment

Comments

@elgalu
Copy link

elgalu commented Nov 2, 2020

Would it be possible (or maybe it is already) to add a PurchasingOption, let's say called something like spot-with-timeout-to-on-demand that first tries to get a spot instance and then, after certain configurable timeout, it falls-back to on-demand?

@pauloestrela
Copy link

When you ask for an amount of EC2 instances through CreateFleet API, you must specify the DefaultTargetCapacityType parameter as spot or on-demand. What can be done is: if an error is raised, repeat EC2 request changing DefaultTargetCapacityType to on-demand. But you can also create 2 partitions, 1 spot em 1 on-demand and a script to move a job that isn't getting a ec2 to the on-demand partition.

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.create_fleet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants