Skip to main content
All CollectionsActionsAmazon Web Services
Request EC2 Spot Instances Actions
Request EC2 Spot Instances Actions
Matt Houser avatar
Written by Matt Houser
Updated over a week ago

Description

The Request EC2 Spot Instances action can be used to submit a spot instance request. Once the requests have been submitted, they can be optionally cancelled after they have been waiting for a specific amount of time. Launched EC2 instances can also be terminated after a specific amount of time.

Settings

Please see Common Action Settings for a description of settings common to all action types.

Image Identification Method

Method in which AMI images will be selected for the spot instance request. Possible options include:

  • All Images

  • By Image ID

  • By Image Name

  • By Image Description

  • By Image Name Tag

  • By Resource Tag

The most recent image of all matching images will be used.

Image ID

Indicates the image ID of the AMI image to use for the spot instance request.

Image Name

Comparison to use when matching the AMI image name.

Image Description

Comparison to use when matching the AMI image description.

Image Name Tag

Comparison to use when matching the "Name" tag on the AMI image.

Resource Tag Name

Name of the resource tag to compare.

Resource Tag Value

Comparison to use when matching the resource tag value.

Maximum Spot Price

Indicates the maximum spot price that you are willing to pay. Prices are in US dollars.

Maximum Instance Count

Indicates the maximum number of spot requests.

Instance Type

Indicates the instance type (or machine size) of the new instances.

Availability Zone

Optional. Indicates the availability zone the new instances should be launched in.

Subnet ID

Optional. Indicates the id of the subnet to launch the instances into. This used when using Amazon Virtual Private Cloud.

Security Group ID

Optional. Indicates the security group to assign to the new instances. This value usually looks like "sg-84a3dc7b". If no security group is specified, the "default" security group is used.

Key/Pair Name

Optional. Name of the key pair used for SSH access and administrator password decryption.

IAM Instance Profile Name

Optional. Name of the IAM instance profile with which the new EC2 instances should run.

User Data

Optional. Specify user data to help configure your instances.

User Data Format

Format of the user data. Possible options include:

  • Text

  • Base-64 Encoded

Elastic IP

Optional. Specify an Elastic IP address which will be assigned to the first instance that becomes available.

Cancel the Request 

If the requests should be cancelled automatically, enable this option.

Time Before Request Is Cancelled

If the requests should be cancelled automatically, specify the length of time the requests are to stay open before they are cancelled.

Terminate the Instances

If the instances should be terminated, enable this option.

Time Before Termination

If the requests should be terminated automatically, specify the length of time the instances are to stay running before they are terminated.

Amazon Commands Used

The following Amazon AWS commands are used. The access key should have permission to execute all of them.

  • ec2:AssociateAddress

  • ec2:CancelSpotInstanceRequests

  • ec2:DescribeAddresses

  • ec2:DescribeImages

  • ec2:DescribeInstances

  • ec2:DescribeSpotInstanceRequests

  • ec2:DisassociateAddress

  • ec2:RequestSpotInstances

  • ec2:TerminateInstances

  • iam:CreateServiceLinkedRole

  • iam:PassRole

Did this answer your question?