Skip to main content

warm_pools

Creates, updates, deletes, gets or lists a warm_pools resource.

Overview

Namewarm_pools
TypeResource
Idaws.autoscaling.warm_pools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
availability_zonestringThe Availability Zone in which the instance is running.
availability_zone_idstringThe Availability Zone ID where the instance was launched.
health_statusstringThe last reported health status of the instance. Healthy means that the instance is healthy and should remain in service. Unhealthy means that the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate and replace it.
image_idstringThe ID of the Amazon Machine Image (AMI) used for the instance's current root volume. This value reflects the most recent AMI applied to the instance, including updates made through root volume replacement operations. This field appears for: Instances with root volume replacements through Instance Refresh Instances launched with AMI overrides This field won't appear for: Existing instances launched from Launch Templates without overrides Existing instances that didn’t have their root volume replaced through Instance Refresh
instance_idstringThe ID of the instance.
instance_typestringThe instance type of the EC2 instance.
launch_configuration_namestringThe launch configuration associated with the instance.
launch_templatestringThe launch template for the instance.
lifecycle_statestringA description of the current lifecycle state. The Quarantined state is not used. For more information, see Amazon EC2 Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide.
protected_from_scale_inbooleanIndicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
weighted_capacitystringThe number of capacity units contributed by the instance based on its instance type. Valid Range: Minimum value of 1. Maximum value of 999.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_warm_poolselectAutoScalingGroupName, regionMaxRecords, NextTokenGets information about a warm pool and its instances. For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
put_warm_poolreplaceAutoScalingGroupName, regionMaxGroupPreparedCapacity, MinSize, PoolState, InstanceReusePolicyCreates or updates a warm pool for the specified Auto Scaling group. A warm pool is a pool of pre-initialized EC2 instances that sits alongside the Auto Scaling group. Whenever your application needs to scale out, the Auto Scaling group can draw on the warm pool to meet its new desired capacity. This operation must be called from the Region in which the Auto Scaling group was created. You can view the instances in the warm pool using the DescribeWarmPool API call. If you are no longer using a warm pool, you can delete it by calling the DeleteWarmPool API. For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.
delete_warm_pooldeleteAutoScalingGroupName, regionForceDeleteDeletes the warm pool for the specified Auto Scaling group. For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
AutoScalingGroupNamestringThe name of the Auto Scaling group.
regionstringAWS region (default: us-east-1)
ForceDeletebooleanSpecifies that the warm pool is to be deleted along with all of its associated instances, without waiting for all instances to be terminated. This parameter also deletes any outstanding lifecycle actions associated with the warm pool instances.
InstanceReusePolicyobjectIndicates whether instances in the Auto Scaling group can be returned to the warm pool on scale in. The default is to terminate instances in the Auto Scaling group when the group scales in.
MaxGroupPreparedCapacityintegerSpecifies the maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group. This is an optional property. Specify it only if you do not want the warm pool size to be determined by the difference between the group's maximum capacity and its desired capacity. If a value for MaxGroupPreparedCapacity is not specified, Amazon EC2 Auto Scaling launches and maintains the difference between the group's maximum capacity and its desired capacity. If you specify a value for MaxGroupPreparedCapacity, Amazon EC2 Auto Scaling uses the difference between the MaxGroupPreparedCapacity and the desired capacity instead. The size of the warm pool is dynamic. Only when MaxGroupPreparedCapacity and MinSize are set to the same value does the warm pool have an absolute size. If the desired capacity of the Auto Scaling group is higher than the MaxGroupPreparedCapacity, the capacity of the warm pool is 0, unless you specify a value for MinSize. To remove a value that you previously set, include the property but specify -1 for the value.
MaxRecordsintegerThe maximum number of instances to return with this call. The maximum value is 50.
MinSizeintegerSpecifies the minimum number of instances to maintain in the warm pool. This helps you to ensure that there is always a certain number of warmed instances available to handle traffic spikes. Defaults to 0 if not specified.
NextTokenstringThe token for the next set of instances to return. (You received this token from a previous call.)
PoolStatestringSets the instance state to transition to after the lifecycle actions are complete. Default is Stopped.

SELECT examples

Gets information about a warm pool and its instances. For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

SELECT
availability_zone,
availability_zone_id,
health_status,
image_id,
instance_id,
instance_type,
launch_configuration_name,
launch_template,
lifecycle_state,
protected_from_scale_in,
weighted_capacity
FROM aws.autoscaling.warm_pools
WHERE AutoScalingGroupName = '{{ AutoScalingGroupName }}' -- required
AND region = '{{ region }}' -- required
AND MaxRecords = '{{ MaxRecords }}'
AND NextToken = '{{ NextToken }}'
;

REPLACE examples

Creates or updates a warm pool for the specified Auto Scaling group. A warm pool is a pool of pre-initialized EC2 instances that sits alongside the Auto Scaling group. Whenever your application needs to scale out, the Auto Scaling group can draw on the warm pool to meet its new desired capacity. This operation must be called from the Region in which the Auto Scaling group was created. You can view the instances in the warm pool using the DescribeWarmPool API call. If you are no longer using a warm pool, you can delete it by calling the DeleteWarmPool API. For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

REPLACE aws.autoscaling.warm_pools
SET
-- No updatable properties
WHERE
AutoScalingGroupName = '{{ AutoScalingGroupName }}' --required
AND region = '{{ region }}' --required
AND MaxGroupPreparedCapacity = '{{ MaxGroupPreparedCapacity}}'
AND MinSize = '{{ MinSize}}'
AND PoolState = '{{ PoolState}}'
AND InstanceReusePolicy = '{{ InstanceReusePolicy}}';

DELETE examples

Deletes the warm pool for the specified Auto Scaling group. For more information, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

DELETE FROM aws.autoscaling.warm_pools
WHERE AutoScalingGroupName = '{{ AutoScalingGroupName }}' --required
AND region = '{{ region }}' --required
AND ForceDelete = '{{ ForceDelete }}'
;