Working with Spot Instances
AWS ParallelCluster uses Spot Instances if you have set SlurmQueues /
CapacityType or AwsBatchQueues / CapacityType to SPOT
in the cluster configuration file. Spot Instances are more cost effective than On-Demand Instances, but they might be interrupted. It might help to
take advantage of Spot Instance interruption notices, which provide a two-minute warning before Amazon EC2 must stop or terminate
your Spot Instance. For more information, see Spot Instance interruptions in
Amazon EC2 User Guide. To learn how AwsBatchQueues works with Spot Instances, see Compute Resources
in the AWS Batch User Guide.
The AWS ParallelCluster configured scheduler assigns jobs to compute resources in queues with spot instances in the same way it assigns jobs to compute resources in queues with on-demand instances.
When using Spot Instances, an AWSServiceRoleForEC2Spot service-linked role must exist in your account. To create this role in your account using the AWS CLI, run the following command:
$
aws iam create-service-linked-role --aws-service-name spot.amazonaws.com
For more information, see Service-linked role for Spot Instance requests in the Amazon EC2 User Guide.
The following sections describe three scenarios in which Spot Instances can be interrupted when using SlurmQueues.
For more information about Spot Instances, see Spot Instances in the Amazon EC2 User Guide.