Closed peterschmidt85 closed 3 weeks ago
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale. Please reopen the issue if it is still relevant.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale. Please reopen the issue if it is still relevant.
To use spot instances with an AWS account, the account needs to have the corresponding service-linked role created (
AWSServiceRoleForEC2Spot
). If this role is not created, AWS will throw the following error upon an attempt to run a spot instance:From the docs:
Solution
If the role isn't created (e.g. if the AWS account was created long time ago), the role has to be created manually by the following command:
Note, this is not
dstack
's issue. If a spot instance cannot be created because of the lack of this role,dstack
treats this as spot instances not available.