EC2 Spot Instance Request

An EC2 Spot Instance Request in AWS allows you to bid for unused EC2 capacity at discounted prices compared to On-Demand instances. You specify the instance type, availability zone, and maximum price you are willing to pay. If capacity is available and your bid meets the requirements, the instance runs until capacity is reclaimed or you terminate it. This is ideal for flexible, fault-tolerant workloads.

aws.ec2_spot_instance_request

Fields

TitleIDTypeData TypeDescription
_keycorestring
account_idcorestring
actual_block_hourly_pricecorestringDeprecated.
availability_zone_groupcorestringThe Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
block_duration_minutescoreint64Deprecated.
create_timecoretimestampThe date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
faultcorejsonThe fault codes for the Spot Instance request, if any.
instance_idcorestringThe instance ID, if an instance has been launched to fulfill the Spot Instance request.
instance_interruption_behaviorcorestringThe behavior when a Spot Instance is interrupted.
launch_groupcorestringThe instance launch group. Launch groups are Spot Instances that launch together and terminate together.
launch_specificationcorejsonAdditional information for launching instances.
launched_availability_zonecorestringThe Availability Zone in which the request is launched.
product_descriptioncorestringThe product description associated with the Spot Instance.
spot_instance_request_arncorestring
spot_instance_request_idcorestringThe ID of the Spot Instance request.
spot_pricecorestringThe maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price. If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
statecorestringThe state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.
statuscorejsonThe status code and status message describing the Spot Instance request.
tagscorehstore
typecorestringThe Spot Instance request type.
valid_fromcoretimestampThe start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.
valid_untilcoretimestampThe end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). For a persistent request, the request remains active until the validUntil date and time is reached. Otherwise, the request remains active until you cancel it. For a one-time request, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.