Attaches one or more EC2 instances to the specified Auto Scaling group.
When you attach instances, Amazon EC2 Auto Scaling increases the desired capacity of the group by the number of instances being attached. If the number of instances being attached plus the desired capacity of the group exceeds the maximum size of the group, the operation fails.
If there is a Classic Load Balancer attached to your Auto Scaling group, the instances are also registered with the load balancer. If there are target groups attached to your Auto Scaling group, the instances are also registered with the target groups.
For more information, see Attach EC2 Instances to Your Auto Scaling Group in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"InstanceIds" : [ "string" ]
}
Attaches one or more target groups to the specified Auto Scaling group.
To describe the target groups for an Auto Scaling group, call the DescribeLoadBalancerTargetGroups API. To detach the target group from the Auto Scaling group, call the DetachLoadBalancerTargetGroups API.
With Application Load Balancers and Network Load Balancers, instances are registered as targets with a target group. With Classic Load Balancers, instances are registered with the load balancer. For more information, see Attaching a Load Balancer to Your Auto Scaling Group in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"TargetGroupARNs" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
To attach an Application Load Balancer or a Network Load Balancer, use the AttachLoadBalancerTargetGroups API operation instead.
Attaches one or more Classic Load Balancers to the specified Auto Scaling group. Amazon EC2 Auto Scaling registers the running instances with these Classic Load Balancers.
To describe the load balancers for an Auto Scaling group, call the DescribeLoadBalancers API. To detach the load balancer from the Auto Scaling group, call the DetachLoadBalancers API.
For more information, see Attaching a Load Balancer to Your Auto Scaling Group in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"LoadBalancerNames" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Deletes one or more scheduled actions for the specified Auto Scaling group.
Type: object
{
"ScheduledActionNames" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Creates or updates one or more scheduled scaling actions for an Auto Scaling group. If you leave a parameter unspecified when updating a scheduled scaling action, the corresponding value remains unchanged.
Type: object
{
"ScheduledUpdateGroupActions" : [ {
"ScheduledUpdateGroupActionRequest" : {
"Recurrence" : "The recurring schedule for the action, in Unix cron syntax format. This format consists of five fields separated by white spaces: [Minute] [Hour] [Day_of_Month] [Month_of_Year] [Day_of_Week]. The value must be in quotes (for example, \"30 0 1 1,6,12 *\"). For more information about this format, see Crontab. \nWhen StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action starts and stops.",
"MinSize" : "The minimum size of the Auto Scaling group.",
"ScheduledActionName" : "The name of the scaling action.",
"EndTime" : "The date and time for the recurring schedule to end. Amazon EC2 Auto Scaling does not perform the action after this time.",
"StartTime" : "The date and time for the action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and in quotes (for example, \"2019-06-01T00:00:00Z\"). \nIf you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs the action at this time, and then performs the action based on the specified recurrence. \nIf you try to schedule the action in the past, Amazon EC2 Auto Scaling returns an error message.",
"DesiredCapacity" : "The desired capacity is the initial capacity of the Auto Scaling group after the scheduled action runs and the capacity it attempts to maintain.",
"MaxSize" : "The maximum size of the Auto Scaling group."
}
} ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Cancels an instance refresh operation in progress. Cancellation does not roll back any replacements that have already been completed, but it prevents new replacements from being started.
For more information, see Replacing Auto Scaling Instances Based on an Instance Refresh.
Completes the lifecycle action for the specified token or instance with the specified result.
This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:
(Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates instances.
(Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to the target.
Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.
If you finish before the timeout period ends, complete the lifecycle action.
For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"LifecycleHookName" : "The name of the lifecycle hook.",
"InstanceId" : "The ID of the instance.",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"LifecycleActionResult" : "The action for the group to take. This parameter can be either CONTINUE or ABANDON.",
"LifecycleActionToken" : "A universally unique identifier (UUID) that identifies a specific lifecycle action associated with an instance. Amazon EC2 Auto Scaling sends this token to the notification target you specified when you created the lifecycle hook."
}
Creates an Auto Scaling group with the specified name and attributes.
If you exceed your maximum limit of Auto Scaling groups, the call fails. To query this limit, call the DescribeAccountLimits API. For information about updating this limit, see Amazon EC2 Auto Scaling Service Quotas in the Amazon EC2 Auto Scaling User Guide.
For introductory exercises for creating an Auto Scaling group, see Getting Started with Amazon EC2 Auto Scaling and Tutorial: Set Up a Scaled and Load-Balanced Application in the Amazon EC2 Auto Scaling User Guide. For more information, see Auto Scaling Groups in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"LoadBalancerNames" : [ "string" ],
"LifecycleHookSpecificationList" : [ {
"LifecycleHookSpecification" : {
"LifecycleHookName" : "The name of the lifecycle hook.",
"LifecycleTransition" : "The state of the EC2 instance to which you want to attach the lifecycle hook. The valid values are: \n autoscaling:EC2_INSTANCE_LAUNCHING \n autoscaling:EC2_INSTANCE_TERMINATING ",
"HeartbeatTimeout" : "The maximum time, in seconds, that can elapse before the lifecycle hook times out. \nIf the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action that you specified in the DefaultResult parameter. You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat.",
"NotificationMetadata" : "Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.",
"DefaultResult" : "Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. The valid values are CONTINUE and ABANDON. The default value is ABANDON.",
"NotificationTargetARN" : "The ARN of the target that Amazon EC2 Auto Scaling sends notifications to when an instance is in the transition state for the lifecycle hook. The notification target can be either an SQS queue or an SNS topic.",
"RoleARN" : "The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target, for example, an Amazon SNS topic or an Amazon SQS queue."
}
} ],
"LaunchConfigurationName" : "The name of the launch configuration to use when an instance is launched. To get the launch configuration name, use the DescribeLaunchConfigurations API operation. New launch configurations can be created with the CreateLaunchConfiguration API. \nYou must specify one of the following parameters in your request: LaunchConfigurationName, LaunchTemplate, InstanceId, or MixedInstancesPolicy.",
"ServiceLinkedRoleARN" : "The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS services on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling, which it creates if it does not exist. For more information, see Service-Linked Roles in the Amazon EC2 Auto Scaling User Guide.",
"InstanceId" : "The ID of the instance used to create a launch configuration for the group. To get the instance ID, use the Amazon EC2 DescribeInstances API operation. \nWhen you specify an ID of an instance, Amazon EC2 Auto Scaling creates a new launch configuration and associates it with the group. This launch configuration derives its attributes from the specified instance, except for the block device mapping. \nYou must specify one of the following parameters in your request: LaunchConfigurationName, LaunchTemplate, InstanceId, or MixedInstancesPolicy.",
"TargetGroupARNs" : [ "string" ],
"AvailabilityZones" : [ "string" ],
"DesiredCapacity" : "The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. It can scale beyond this capacity if you configure automatic scaling. \nThis number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity, the default is the minimum size of the group.",
"HealthCheckGracePeriod" : "The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service. During this time, any health check failures for the instance are ignored. The default value is 0. \nFor more information, see Health Check Grace Period in the Amazon EC2 Auto Scaling User Guide. \nRequired if you are adding an ELB health check.",
"MaxSize" : "The maximum size of the group. \nWith a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above MaxSize by more than your maximum instance weight (weights that define how many capacity units each instance contributes to the capacity of the group).",
"NewInstancesProtectedFromScaleIn" : "Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. \nFor more information about preventing instances from terminating on scale in, see Instance Protection in the Amazon EC2 Auto Scaling User Guide.",
"MinSize" : "The minimum size of the group.",
"DefaultCooldown" : "The amount of time, in seconds, after a scaling activity completes before another scaling activity can start. The default value is 300. \nThis setting applies when using simple scaling policies, but not when using other scaling policies or scheduled scaling. For more information, see Scaling Cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.",
"TerminationPolicies" : [ "string" ],
"LaunchTemplate" : {
"LaunchTemplateName" : "The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API. \nYou must specify either a template ID or a template name.",
"Version" : "The version number, $Latest, or $Default. To get the version number, use the Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon EC2 CreateLaunchTemplateVersion API. \nIf the value is $Latest, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is $Default, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is $Default.",
"LaunchTemplateId" : "The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API. \nYou must specify either a template ID or a template name."
},
"AutoScalingGroupName" : "The name of the Auto Scaling group. This name must be unique per Region per account.",
"MixedInstancesPolicy" : {
"InstancesDistribution" : {
"OnDemandAllocationStrategy" : "Indicates how to allocate instance types to fulfill On-Demand capacity. \nThe only valid value is prioritized, which is also the default value. This strategy uses the order of instance type overrides for the LaunchTemplate to define the launch priority of each instance type. The first instance type in the array is prioritized higher than the last. If all your On-Demand capacity cannot be fulfilled using your highest priority instance, then the Auto Scaling groups launches the remaining capacity using the second priority instance type, and so on.",
"OnDemandBaseCapacity" : "The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales. \nDefault if not set is 0. If you leave it set to 0, On-Demand Instances are launched as a percentage of the Auto Scaling group's desired capacity, per the OnDemandPercentageAboveBaseCapacity setting. \nAn update to this setting means a gradual replacement of instances to maintain the specified number of On-Demand Instances for your base capacity. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the old ones.",
"OnDemandPercentageAboveBaseCapacity" : "Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity. \nDefault if not set is 100. If you leave it set to 100, the percentages are 100% for On-Demand Instances and 0% for Spot Instances. \nAn update to this setting means a gradual replacement of instances to maintain the percentage of On-Demand Instances for your additional capacity above the base capacity. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the old ones. \nValid Range: Minimum value of 0. Maximum value of 100.",
"SpotInstancePools" : "The number of Spot Instance pools across which to allocate your Spot Instances. The Spot pools are determined from the different instance types in the Overrides array of LaunchTemplate. Default if not set is 2. \nUsed only when the Spot allocation strategy is lowest-price. \nValid Range: Minimum value of 1. Maximum value of 20.",
"SpotAllocationStrategy" : "Indicates how to allocate instances across Spot Instance pools. \nIf the allocation strategy is lowest-price, the Auto Scaling group launches instances using the Spot pools with the lowest price, and evenly allocates your instances across the number of Spot pools that you specify. If the allocation strategy is capacity-optimized, the Auto Scaling group launches instances using Spot pools that are optimally chosen based on the available Spot capacity. \nThe default Spot allocation strategy for calls that you make through the API, the AWS CLI, or the AWS SDKs is lowest-price. The default Spot allocation strategy for the AWS Management Console is capacity-optimized. \nValid values: lowest-price | capacity-optimized ",
"SpotMaxPrice" : "The maximum price per unit hour that you are willing to pay for a Spot Instance. If you leave the value of this parameter blank (which is the default), the maximum Spot price is set at the On-Demand price. \nTo remove a value that you previously set, include the parameter but leave the value blank."
},
"LaunchTemplate" : {
"LaunchTemplateSpecification" : {
"LaunchTemplateName" : "The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API. \nYou must specify either a template ID or a template name.",
"Version" : "The version number, $Latest, or $Default. To get the version number, use the Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon EC2 CreateLaunchTemplateVersion API. \nIf the value is $Latest, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is $Default, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is $Default.",
"LaunchTemplateId" : "The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API. \nYou must specify either a template ID or a template name."
},
"Overrides" : [ {
"LaunchTemplateOverrides" : {
"WeightedCapacity" : "The number of capacity units, which gives the instance type a proportional weight to other instance types. For example, larger instance types are generally weighted more than smaller instance types. These are the same units that you chose to set the desired capacity in terms of instances, or a performance attribute such as vCPUs, memory, or I/O. \nFor more information, see Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide. \nValid Range: Minimum value of 1. Maximum value of 999.",
"InstanceType" : "The instance type. You must use an instance type that is supported in your requested Region and Availability Zones. \nFor information about available instance types, see Available Instance Types in the Amazon Elastic Compute Cloud User Guide. "
}
} ]
}
},
"VPCZoneIdentifier" : "A comma-separated list of subnet IDs for your virtual private cloud (VPC). \nIf you specify VPCZoneIdentifier with AvailabilityZones, the subnets that you specify for this parameter must reside in those Availability Zones. \nConditional: If your account supports EC2-Classic and VPC, this parameter is required to launch instances into a VPC.",
"PlacementGroup" : "The name of the placement group into which to launch your instances, if any. A placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a placement group. For more information, see Placement Groups in the Amazon EC2 User Guide for Linux Instances.",
"HealthCheckType" : "The service to use for the health checks. The valid values are EC2 and ELB. The default value is EC2. If you configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it fails either the EC2 status checks or the load balancer health checks. \nFor more information, see Health Checks for Auto Scaling Instances in the Amazon EC2 Auto Scaling User Guide.",
"Tags" : [ {
"Tag" : {
"ResourceId" : "The name of the group.",
"Value" : "The tag value.",
"ResourceType" : "The type of resource. The only supported value is auto-scaling-group.",
"Key" : "The tag key.",
"PropagateAtLaunch" : "Determines whether the tag is added to new instances as they are launched in the group."
}
} ],
"MaxInstanceLifetime" : "The maximum amount of time, in seconds, that an instance can be in service. The default is null. \nThis parameter is optional, but if you specify a value for it, you must specify a value of at least 604,800 seconds (7 days). To clear a previously set value, specify a new value of 0. \nFor more information, see Replacing Auto Scaling Instances Based on Maximum Instance Lifetime in the Amazon EC2 Auto Scaling User Guide. \nValid Range: Minimum value of 0."
}
Creates a launch configuration.
If you exceed your maximum limit of launch configurations, the call fails. To query this limit, call the DescribeAccountLimits API. For information about updating this limit, see Amazon EC2 Auto Scaling Service Quotas in the Amazon EC2 Auto Scaling User Guide.
For more information, see Launch Configurations in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"PlacementTenancy" : "The tenancy of the instance. An instance with dedicated tenancy runs on isolated, single-tenant hardware and can only be launched into a VPC. \nTo launch dedicated instances into a shared tenancy VPC (a VPC with the instance placement tenancy attribute set to default), you must set the value of this parameter to dedicated. \nIf you specify PlacementTenancy, you must specify at least one subnet for VPCZoneIdentifier when you create your group. \nFor more information, see Instance Placement Tenancy in the Amazon EC2 Auto Scaling User Guide. \nValid Values: default | dedicated ",
"SecurityGroups" : [ "string" ],
"LaunchConfigurationName" : "The name of the launch configuration. This name must be unique per Region per account.",
"UserData" : "The Base64-encoded user data to make available to the launched EC2 instances. For more information, see Instance Metadata and User Data in the Amazon EC2 User Guide for Linux Instances.",
"InstanceId" : "The ID of the instance to use to create the launch configuration. The new launch configuration derives attributes from the instance, except for the block device mapping. \nTo create a launch configuration with a block device mapping or override any other instance attributes, specify them as part of the same request. \nFor more information, see Create a Launch Configuration Using an EC2 Instance in the Amazon EC2 Auto Scaling User Guide. \nIf you do not specify InstanceId, you must specify both ImageId and InstanceType.",
"ClassicLinkVPCSecurityGroups" : [ "string" ],
"BlockDeviceMappings" : [ {
"BlockDeviceMapping" : {
"Ebs" : {
"SnapshotId" : "The snapshot ID of the volume to use. \nYou must specify either a VolumeSize or a SnapshotId.",
"VolumeType" : "The volume type, which can be standard for Magnetic, io1 for Provisioned IOPS SSD, gp2 for General Purpose SSD, st1 for Throughput Optimized HDD, or sc1 for Cold HDD. For more information, see Amazon EBS Volume Types in the Amazon EC2 User Guide for Linux Instances. \nValid Values: standard | io1 | gp2 | st1 | sc1 ",
"Encrypted" : "Specifies whether the volume should be encrypted. Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported Instance Types. If your AMI uses encrypted volumes, you can also only launch it on supported instance types. \nIf you are creating a volume from a snapshot, you cannot specify an encryption value. Volumes that are created from encrypted snapshots are automatically encrypted, and volumes that are created from unencrypted snapshots are automatically unencrypted. By default, encrypted snapshots use the AWS managed CMK that is used for EBS encryption, but you can specify a custom CMK when you create the snapshot. The ability to encrypt a snapshot during copying also allows you to apply a new CMK to an already-encrypted snapshot. Volumes restored from the resulting copy are only accessible using the new CMK. \nEnabling encryption by default results in all EBS volumes being encrypted with the AWS managed CMK or a customer managed CMK, whether or not the snapshot was encrypted. \nFor more information, see Using Encryption with EBS-Backed AMIs in the Amazon EC2 User Guide for Linux Instances and Required CMK Key Policy for Use with Encrypted Volumes in the Amazon EC2 Auto Scaling User Guide.",
"Iops" : "The number of I/O operations per second (IOPS) to provision for the volume. The maximum ratio of IOPS to volume size (in GiB) is 50:1. For more information, see Amazon EBS Volume Types in the Amazon EC2 User Guide for Linux Instances. \nRequired when the volume type is io1. (Not used with standard, gp2, st1, or sc1 volumes.) ",
"VolumeSize" : "The volume size, in Gibibytes (GiB). \nThis can be a number from 1-1,024 for standard, 4-16,384 for io1, 1-16,384 for gp2, and 500-16,384 for st1 and sc1. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size. \nDefault: If you create a volume from a snapshot and you don't specify a volume size, the default is the snapshot size. \nYou must specify either a VolumeSize or a SnapshotId. If you specify both SnapshotId and VolumeSize, the volume size must be equal or greater than the size of the snapshot.",
"DeleteOnTermination" : "Indicates whether the volume is deleted on instance termination. For Amazon EC2 Auto Scaling, the default value is true."
},
"NoDevice" : "Setting this value to true suppresses the specified device included in the block device mapping of the AMI. \nIf NoDevice is true for the root device, instances might fail the EC2 health check. In that case, Amazon EC2 Auto Scaling launches replacement instances. \nIf you specify NoDevice, you cannot specify Ebs.",
"VirtualName" : "The name of the virtual device (for example, ephemeral0). \nYou can specify either VirtualName or Ebs, but not both.",
"DeviceName" : "The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh). For more information, see Device Naming on Linux Instances in the Amazon EC2 User Guide for Linux Instances."
}
} ],
"IamInstanceProfile" : "The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The instance profile contains the IAM role. \nFor more information, see IAM Role for Applications That Run on Amazon EC2 Instances in the Amazon EC2 Auto Scaling User Guide.",
"KernelId" : "The ID of the kernel associated with the AMI.",
"AssociatePublicIpAddress" : "For Auto Scaling groups that are running in a virtual private cloud (VPC), specifies whether to assign a public IP address to the group's instances. If you specify true, each instance in the Auto Scaling group receives a unique public IP address. For more information, see Launching Auto Scaling Instances in a VPC in the Amazon EC2 Auto Scaling User Guide. \nIf you specify this parameter, you must specify at least one subnet for VPCZoneIdentifier when you create your group. \nIf the instance is launched into a default subnet, the default is to assign a public IP address, unless you disabled the option to assign a public IP address on the subnet. If the instance is launched into a nondefault subnet, the default is not to assign a public IP address, unless you enabled the option to assign a public IP address on the subnet.",
"ClassicLinkVPCId" : "The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. For more information, see ClassicLink in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic Instances to a VPC in the Amazon EC2 Auto Scaling User Guide. \nThis parameter can only be used if you are launching EC2-Classic instances.",
"EbsOptimized" : "Specifies whether the launch configuration is optimized for EBS I/O (true) or not (false). The optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization is not available with all instance types. Additional fees are incurred when you enable EBS optimization for an instance type that is not EBS-optimized by default. For more information, see Amazon EBS-Optimized Instances in the Amazon EC2 User Guide for Linux Instances. \nThe default value is false.",
"KeyName" : "The name of the key pair. For more information, see Amazon EC2 Key Pairs in the Amazon EC2 User Guide for Linux Instances.",
"RamdiskId" : "The ID of the RAM disk to select.",
"SpotPrice" : "The maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot Instances are launched when the price you specify exceeds the current Spot price. For more information, see Launching Spot Instances in Your Auto Scaling Group in the Amazon EC2 Auto Scaling User Guide. \nWhen you change your maximum price by creating a new launch configuration, running instances will continue to run as long as the maximum price for those running instances is higher than the current Spot price.",
"ImageId" : "The ID of the Amazon Machine Image (AMI) that was assigned during registration. For more information, see Finding an AMI in the Amazon EC2 User Guide for Linux Instances. \nIf you do not specify InstanceId, you must specify ImageId.",
"InstanceType" : "Specifies the instance type of the EC2 instance. \nFor information about available instance types, see Available Instance Types in the Amazon EC2 User Guide for Linux Instances. \nIf you do not specify InstanceId, you must specify InstanceType.",
"InstanceMonitoring" : {
"Enabled" : "If true, detailed monitoring is enabled. Otherwise, basic monitoring is enabled."
}
}
Creates or updates tags for the specified Auto Scaling group.
When you specify a tag with a key that already exists, the operation overwrites the previous tag definition, and you do not get an error message.
For more information, see Tagging Auto Scaling Groups and Instances in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"Tags" : [ {
"Tag" : {
"ResourceId" : "The name of the group.",
"Value" : "The tag value.",
"ResourceType" : "The type of resource. The only supported value is auto-scaling-group.",
"Key" : "The tag key.",
"PropagateAtLaunch" : "Determines whether the tag is added to new instances as they are launched in the group."
}
} ]
}
Deletes the specified Auto Scaling group.
If the group has instances or scaling activities in progress, you must specify the option to force the deletion in order for it to succeed.
If the group has policies, deleting the group deletes the policies, the underlying alarm actions, and any alarm that no longer has an associated action.
To remove instances from the Auto Scaling group before deleting it, call the DetachInstances API with the list of instances and the option to decrement the desired capacity. This ensures that Amazon EC2 Auto Scaling does not launch replacement instances.
To terminate all instances before deleting the Auto Scaling group, call the UpdateAutoScalingGroup API and set the minimum size and desired capacity of the Auto Scaling group to zero.
Type: object
{
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"ForceDelete" : "Specifies that the group is to be deleted along with all instances associated with the group, without waiting for all instances to be terminated. This parameter also deletes any lifecycle actions associated with the group."
}
Deletes the specified launch configuration.
The launch configuration must not be attached to an Auto Scaling group. When this call completes, the launch configuration is no longer available for use.
Deletes the specified lifecycle hook.
If there are any outstanding lifecycle actions, they are completed first (ABANDON for launching instances, CONTINUE for terminating instances).
Type: object
{
"LifecycleHookName" : "The name of the lifecycle hook.",
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Deletes the specified notification.
Type: object
{
"TopicARN" : "The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon SNS) topic.",
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Deletes the specified scaling policy.
Deleting either a step scaling policy or a simple scaling policy deletes the underlying alarm action, but does not delete the alarm, even if it no longer has an associated action.
For more information, see Deleting a Scaling Policy in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"PolicyName" : "The name or Amazon Resource Name (ARN) of the policy."
}
Deletes the specified scheduled action.
Type: object
{
"ScheduledActionName" : "The name of the action to delete.",
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Deletes the specified tags.
Type: object
{
"Tags" : [ {
"Tag" : {
"ResourceId" : "The name of the group.",
"Value" : "The tag value.",
"ResourceType" : "The type of resource. The only supported value is auto-scaling-group.",
"Key" : "The tag key.",
"PropagateAtLaunch" : "Determines whether the tag is added to new instances as they are launched in the group."
}
} ]
}
Describes the current Amazon EC2 Auto Scaling resource quotas for your AWS account.
For information about requesting an increase, see Amazon EC2 Auto Scaling Service Quotas in the Amazon EC2 Auto Scaling User Guide.
This operation has no parameters
Describes the available adjustment types for Amazon EC2 Auto Scaling scaling policies. These settings apply to step scaling policies and simple scaling policies; they do not apply to target tracking scaling policies.
The following adjustment types are supported:
ChangeInCapacity
ExactCapacity
PercentChangeInCapacity
This operation has no parameters
Describes one or more Auto Scaling groups.
Describes one or more Auto Scaling instances.
Describes the notification types that are supported by Amazon EC2 Auto Scaling.
This operation has no parameters
Describes one or more instance refreshes.
You can determine the status of a request by looking at the Status parameter. The following are the possible statuses:
Pending - The request was created, but the operation has not started.
InProgress - The operation is in progress.
Successful - The operation completed successfully.
Failed - The operation failed to complete. You can troubleshoot using the status reason and the scaling activities.
Cancelling - An ongoing operation is being cancelled. Cancellation does not roll back any replacements that have already been completed, but it prevents new replacements from being started.
Cancelled - The operation is cancelled.
For more information, see Replacing Auto Scaling Instances Based on an Instance Refresh.
Type: object
{
"InstanceRefreshIds" : [ "string" ],
"NextToken" : "The token for the next set of items to return. (You received this token from a previous call.)",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"MaxRecords" : "The maximum number of items to return with this call. The default value is 50 and the maximum value is 100."
}
Describes one or more launch configurations.
Describes the available types of lifecycle hooks.
The following hook types are supported:
autoscaling:EC2_INSTANCE_LAUNCHING
autoscaling:EC2_INSTANCE_TERMINATING
This operation has no parameters
Describes the lifecycle hooks for the specified Auto Scaling group.
Type: object
{
"LifecycleHookNames" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Describes the target groups for the specified Auto Scaling group.
Describes the load balancers for the specified Auto Scaling group.
This operation describes only Classic Load Balancers. If you have Application Load Balancers or Network Load Balancers, use the DescribeLoadBalancerTargetGroups API instead.
Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling.
The GroupStandbyInstances metric is not returned by default. You must explicitly request this metric when calling the EnableMetricsCollection API.
This operation has no parameters
Describes the notification actions associated with the specified Auto Scaling group.
Describes the policies for the specified Auto Scaling group.
Type: object
{
"PolicyNames" : [ "string" ],
"PolicyTypes" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Describes one or more scaling activities for the specified Auto Scaling group.
Type: object
{
"ActivityIds" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Describes the scaling process types for use with the ResumeProcesses and SuspendProcesses APIs.
This operation has no parameters
Describes the actions scheduled for your Auto Scaling group that haven't run or that have not reached their end time. To describe the actions that have already run, call the DescribeScalingActivities API.
Type: object
{
"ScheduledActionNames" : [ "string" ],
"EndTime" : "The latest scheduled start time to return. If scheduled action names are provided, this parameter is ignored.",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"StartTime" : "The earliest scheduled start time to return. If scheduled action names are provided, this parameter is ignored."
}
Describes the specified tags.
You can use filters to limit the results. For example, you can query for the tags for a specific Auto Scaling group. You can specify multiple values for a filter. A tag must match at least one of the specified values for it to be included in the results.
You can also specify multiple filters. The result includes information for a particular tag only if it matches all the filters. If there's no match, no special message is returned.
For more information, see Tagging Auto Scaling Groups and Instances in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"Filters" : [ {
"Filter" : {
"Values" : [ "string" ],
"Name" : "The name of the filter. The valid values are: auto-scaling-group, key, value, and propagate-at-launch."
}
} ]
}
Describes the termination policies supported by Amazon EC2 Auto Scaling.
For more information, see Controlling Which Auto Scaling Instances Terminate During Scale In in the Amazon EC2 Auto Scaling User Guide.
This operation has no parameters
Removes one or more instances from the specified Auto Scaling group.
After the instances are detached, you can manage them independent of the Auto Scaling group.
If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are detached.
If there is a Classic Load Balancer attached to the Auto Scaling group, the instances are deregistered from the load balancer. If there are target groups attached to the Auto Scaling group, the instances are deregistered from the target groups.
For more information, see Detach EC2 Instances from Your Auto Scaling Group in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"ShouldDecrementDesiredCapacity" : "Indicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached.",
"InstanceIds" : [ "string" ]
}
Detaches one or more target groups from the specified Auto Scaling group.
Type: object
{
"TargetGroupARNs" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Detaches one or more Classic Load Balancers from the specified Auto Scaling group.
This operation detaches only Classic Load Balancers. If you have Application Load Balancers or Network Load Balancers, use the DetachLoadBalancerTargetGroups API instead.
When you detach a load balancer, it enters the Removing state while deregistering the instances in the group. When all instances are deregistered, then you can no longer describe the load balancer using the DescribeLoadBalancers API call. The instances remain running.
Type: object
{
"LoadBalancerNames" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Disables group metrics for the specified Auto Scaling group.
Type: object
{
"Metrics" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Enables group metrics for the specified Auto Scaling group. For more information, see Monitoring Your Auto Scaling Groups and Instances in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"Metrics" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"Granularity" : "The granularity to associate with the metrics to collect. The only valid value is 1Minute."
}
Moves the specified instances into the standby state.
If you choose to decrement the desired capacity of the Auto Scaling group, the instances can enter standby as long as the desired capacity of the Auto Scaling group after the instances are placed into standby is equal to or greater than the minimum capacity of the group.
If you choose not to decrement the desired capacity of the Auto Scaling group, the Auto Scaling group launches new instances to replace the instances on standby.
For more information, see Temporarily Removing Instances from Your Auto Scaling Group in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"ShouldDecrementDesiredCapacity" : "Indicates whether to decrement the desired capacity of the Auto Scaling group by the number of instances moved to Standby mode.",
"InstanceIds" : [ "string" ]
}
Executes the specified policy. This can be useful for testing the design of your scaling policy.
Type: object
{
"HonorCooldown" : "Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to complete before executing the policy. \nValid only if the policy type is SimpleScaling. For more information, see Scaling Cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.",
"MetricValue" : "The metric value to compare to BreachThreshold. This enables you to execute a policy of type StepScaling and determine which step adjustment to use. For example, if the breach threshold is 50 and you want to use a step adjustment with a lower bound of 0 and an upper bound of 10, you can set the metric value to 59. \nIf you specify a metric value that doesn't correspond to a step adjustment for the policy, the call returns an error. \nRequired if the policy type is StepScaling and not supported otherwise.",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"PolicyName" : "The name or ARN of the policy.",
"BreachThreshold" : "The breach threshold for the alarm. \nRequired if the policy type is StepScaling and not supported otherwise."
}
Moves the specified instances out of the standby state.
After you put the instances back in service, the desired capacity is incremented.
For more information, see Temporarily Removing Instances from Your Auto Scaling Group in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"InstanceIds" : [ "string" ]
}
Creates or updates a lifecycle hook for the specified Auto Scaling group.
A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an instance when the instance launches (before it is put into service) or as the instance terminates (before it is fully terminated).
This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:
(Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates instances.
(Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to the target.
Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state using the RecordLifecycleActionHeartbeat API call.
If you finish before the timeout period ends, complete the lifecycle action using the CompleteLifecycleAction API call.
For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks in the Amazon EC2 Auto Scaling User Guide.
If you exceed your maximum limit of lifecycle hooks, which by default is 50 per Auto Scaling group, the call fails.
You can view the lifecycle hooks for an Auto Scaling group using the DescribeLifecycleHooks API call. If you are no longer using a lifecycle hook, you can delete it by calling the DeleteLifecycleHook API.
Type: object
{
"LifecycleHookName" : "The name of the lifecycle hook.",
"LifecycleTransition" : "The instance state to which you want to attach the lifecycle hook. The valid values are: \n autoscaling:EC2_INSTANCE_LAUNCHING \n autoscaling:EC2_INSTANCE_TERMINATING \nRequired for new lifecycle hooks, but optional when updating existing hooks.",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"HeartbeatTimeout" : "The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from 30 to 7200 seconds. The default value is 3600 seconds (1 hour). \nIf the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action that you specified in the DefaultResult parameter. You can prevent the lifecycle hook from timing out by calling the RecordLifecycleActionHeartbeat API.",
"NotificationMetadata" : "Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.",
"DefaultResult" : "Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. This parameter can be either CONTINUE or ABANDON. The default value is ABANDON.",
"RoleARN" : "The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target, for example, an Amazon SNS topic or an Amazon SQS queue. \nRequired for new lifecycle hooks, but optional when updating existing hooks.",
"NotificationTargetARN" : "The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify you when an instance is in the transition state for the lifecycle hook. This target can be either an SQS queue or an SNS topic. \nIf you specify an empty string, this overrides the current ARN. \nThis operation uses the JSON format when sending notifications to an Amazon SQS queue, and an email key-value pair format when sending notifications to an Amazon SNS topic. \nWhen you specify a notification target, Amazon EC2 Auto Scaling sends it a test message. Test messages contain the following additional key-value pair: \"Event\": \"autoscaling:TEST_NOTIFICATION\"."
}
Configures an Auto Scaling group to send notifications when specified events take place. Subscribers to the specified topic can have messages delivered to an endpoint such as a web server or an email address.
This configuration overwrites any existing configuration.
For more information, see Getting Amazon SNS Notifications When Your Auto Scaling Group Scales in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"TopicARN" : "The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon SNS) topic.",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"NotificationTypes" : [ "string" ]
}
Creates or updates a scaling policy for an Auto Scaling group.
For more information about using scaling policies to scale your Auto Scaling group, see Target Tracking Scaling Policies and Step and Simple Scaling Policies in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"MetricAggregationType" : "The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. \nValid only if the policy type is StepScaling.",
"PolicyType" : "One of the following policy types: \n TargetTrackingScaling \n StepScaling \n SimpleScaling (default) ",
"ScalingAdjustment" : "The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity. For exact capacity, you must specify a positive value. \nRequired if the policy type is SimpleScaling. (Not used with any other policy type.) ",
"Cooldown" : "The duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group. \nValid only if the policy type is SimpleScaling. For more information, see Scaling Cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.",
"StepAdjustments" : [ {
"StepAdjustment" : {
"MetricIntervalUpperBound" : "The upper bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the upper bound is exclusive (the metric must be less than the threshold plus the upper bound). Otherwise, it is inclusive (the metric must be less than or equal to the threshold plus the upper bound). A null value indicates positive infinity. \nThe upper bound must be greater than the lower bound.",
"MetricIntervalLowerBound" : "The lower bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it is exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.",
"ScalingAdjustment" : "The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity."
}
} ],
"MinAdjustmentMagnitude" : "The minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances. \nValid only if the policy type is StepScaling or SimpleScaling. For more information, see Scaling Adjustment Types in the Amazon EC2 Auto Scaling User Guide. \nSome Auto Scaling groups use instance weights. In this case, set the MinAdjustmentMagnitude to a value that is at least as large as your largest instance weight.",
"Enabled" : "Indicates whether the scaling policy is enabled or disabled. The default is enabled. For more information, see Disabling a Scaling Policy for an Auto Scaling Group in the Amazon EC2 Auto Scaling User Guide.",
"TargetTrackingConfiguration" : {
"TargetValue" : "The target value for the metric.",
"CustomizedMetricSpecification" : {
"MetricName" : "The name of the metric.",
"Statistic" : "The statistic of the metric.",
"Dimensions" : [ {
"MetricDimension" : {
"Value" : "The value of the dimension.",
"Name" : "The name of the dimension."
}
} ],
"Unit" : "The unit of the metric.",
"Namespace" : "The namespace of the metric."
},
"DisableScaleIn" : "Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled, the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking scaling policy can remove instances from the Auto Scaling group. The default is false.",
"PredefinedMetricSpecification" : {
"PredefinedMetricType" : "The metric type. The following predefined metrics are available: \n ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling group. \n ASGAverageNetworkIn - Average number of bytes received on all network interfaces by the Auto Scaling group. \n ASGAverageNetworkOut - Average number of bytes sent out on all network interfaces by the Auto Scaling group. \n ALBRequestCountPerTarget - Number of requests completed per target in an Application Load Balancer target group. ",
"ResourceLabel" : "Identifies the resource associated with the metric type. You can't specify a resource label unless the metric type is ALBRequestCountPerTarget and there is a target group attached to the Auto Scaling group. \nElastic Load Balancing sends data about your load balancers to Amazon CloudWatch. CloudWatch collects the data and specifies the format to use to access the data. The format is app/load-balancer-name/load-balancer-id/targetgroup/target-group-name/target-group-id , where \n app/load-balancer-name/load-balancer-id is the final portion of the load balancer ARN, and \n targetgroup/target-group-name/target-group-id is the final portion of the target group ARN. \nTo find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use the DescribeTargetGroups API operation."
}
},
"AdjustmentType" : "Specifies how the scaling adjustment is interpreted (either an absolute number or a percentage). The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity. \nRequired if the policy type is StepScaling or SimpleScaling. For more information, see Scaling Adjustment Types in the Amazon EC2 Auto Scaling User Guide.",
"MinAdjustmentStep" : "Available for backward compatibility. Use MinAdjustmentMagnitude instead.",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"PolicyName" : "The name of the policy.",
"EstimatedInstanceWarmup" : "The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. \nValid only if the policy type is TargetTrackingScaling or StepScaling."
}
Creates or updates a scheduled scaling action for an Auto Scaling group. If you leave a parameter unspecified when updating a scheduled scaling action, the corresponding value remains unchanged.
For more information, see Scheduled Scaling in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"Recurrence" : "The recurring schedule for this action, in Unix cron syntax format. This format consists of five fields separated by white spaces: [Minute] [Hour] [Day_of_Month] [Month_of_Year] [Day_of_Week]. The value must be in quotes (for example, \"30 0 1 1,6,12 *\"). For more information about this format, see Crontab. \nWhen StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action starts and stops.",
"MinSize" : "The minimum size of the Auto Scaling group.",
"ScheduledActionName" : "The name of this scaling action.",
"EndTime" : "The date and time for the recurring schedule to end. Amazon EC2 Auto Scaling does not perform the action after this time.",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"StartTime" : "The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and in quotes (for example, \"2019-06-01T00:00:00Z\"). \nIf you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs the action at this time, and then performs the action based on the specified recurrence. \nIf you try to schedule your action in the past, Amazon EC2 Auto Scaling returns an error message.",
"DesiredCapacity" : "The desired capacity is the initial capacity of the Auto Scaling group after the scheduled action runs and the capacity it attempts to maintain. It can scale beyond this capacity if you add more scaling conditions. ",
"Time" : "This parameter is no longer used.",
"MaxSize" : "The maximum size of the Auto Scaling group."
}
Records a heartbeat for the lifecycle action associated with the specified token or instance. This extends the timeout by the length of time defined using the PutLifecycleHook API call.
This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:
(Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates instances.
(Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to the target.
Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.
If you finish before the timeout period ends, complete the lifecycle action.
For more information, see Auto Scaling Lifecycle in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"LifecycleHookName" : "The name of the lifecycle hook.",
"InstanceId" : "The ID of the instance.",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"LifecycleActionToken" : "A token that uniquely identifies a specific lifecycle action associated with an instance. Amazon EC2 Auto Scaling sends this token to the notification target that you specified when you created the lifecycle hook."
}
Resumes the specified suspended automatic scaling processes, or all suspended process, for the specified Auto Scaling group.
For more information, see Suspending and Resuming Scaling Processes in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"ScalingProcesses" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Sets the size of the specified Auto Scaling group.
If a scale-in activity occurs as a result of a new DesiredCapacity value that is lower than the current size of the group, the Auto Scaling group uses its termination policy to determine which instances to terminate.
For more information, see Manual Scaling in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"HonorCooldown" : "Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to complete before initiating a scaling activity to set your Auto Scaling group to its new capacity. By default, Amazon EC2 Auto Scaling does not honor the cooldown period during manual scaling activities.",
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"DesiredCapacity" : "The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the capacity it attempts to maintain."
}
Sets the health status of the specified instance.
For more information, see Health Checks for Auto Scaling Instances in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"InstanceId" : "The ID of the instance.",
"ShouldRespectGracePeriod" : "If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod specified for the group, by default, this call respects the grace period. Set this to False, to have the call not respect the grace period associated with the group. \nFor more information about the health check grace period, see CreateAutoScalingGroup in the Amazon EC2 Auto Scaling API Reference.",
"HealthStatus" : "The health status of the instance. Set to Healthy to have the instance remain in service. Set to Unhealthy to have the instance be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy instance."
}
Updates the instance protection settings of the specified instances.
For more information about preventing instances that are part of an Auto Scaling group from terminating on scale in, see Instance Protection in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"ProtectedFromScaleIn" : "Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.",
"InstanceIds" : [ "string" ]
}
Starts a new instance refresh operation, which triggers a rolling replacement of all previously launched instances in the Auto Scaling group with a new group of instances.
If successful, this call creates a new instance refresh request with a unique ID that you can use to track its progress. To query its status, call the DescribeInstanceRefreshes API. To describe the instance refreshes that have already run, call the DescribeInstanceRefreshes API. To cancel an instance refresh operation in progress, use the CancelInstanceRefresh API.
For more information, see Replacing Auto Scaling Instances Based on an Instance Refresh.
Type: object
{
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"Strategy" : "The strategy to use for the instance refresh. The only valid value is Rolling. \nA rolling update is an update that is applied to all instances in an Auto Scaling group until all instances have been updated. A rolling update can fail due to failed health checks or if instances are on standby or are protected from scale in. If the rolling update process fails, any instances that were already replaced are not rolled back to their previous configuration. ",
"Preferences" : {
"InstanceWarmup" : "The number of seconds until a newly launched instance is configured and ready to use. During this time, Amazon EC2 Auto Scaling does not immediately move on to the next replacement. The default is to use the value for the health check grace period defined for the group.",
"MinHealthyPercentage" : "The amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group (rounded up to the nearest integer). The default is 90. "
}
}
Suspends the specified automatic scaling processes, or all processes, for the specified Auto Scaling group.
If you suspend either the Launch or Terminate process types, it can prevent other process types from functioning properly. For more information, see Suspending and Resuming Scaling Processes in the Amazon EC2 Auto Scaling User Guide.
To resume processes that have been suspended, call the ResumeProcesses API.
Type: object
{
"ScalingProcesses" : [ "string" ],
"AutoScalingGroupName" : "The name of the Auto Scaling group."
}
Terminates the specified instance and optionally adjusts the desired group size.
This call simply makes a termination request. The instance is not terminated immediately. When an instance is terminated, the instance status changes to terminated. You can't connect to or start an instance after you've terminated it.
If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are terminated.
By default, Amazon EC2 Auto Scaling balances instances across all Availability Zones. If you decrement the desired capacity, your Auto Scaling group can become unbalanced between Availability Zones. Amazon EC2 Auto Scaling tries to rebalance the group, and rebalancing might terminate instances in other zones. For more information, see Rebalancing Activities in the Amazon EC2 Auto Scaling User Guide.
Type: object
{
"InstanceId" : "The ID of the instance.",
"ShouldDecrementDesiredCapacity" : "Indicates whether terminating the instance also decrements the size of the Auto Scaling group."
}
Updates the configuration for the specified Auto Scaling group.
To update an Auto Scaling group, specify the name of the group and the parameter that you want to change. Any parameters that you don't specify are not changed by this update request. The new settings take effect on any scaling activities after this call returns.
If you associate a new launch configuration or template with an Auto Scaling group, all new instances will get the updated configuration. Existing instances continue to run with the configuration that they were originally launched with. When you update a group to specify a mixed instances policy instead of a launch configuration or template, existing instances may be replaced to match the new purchasing options that you specified in the policy. For example, if the group currently has 100% On-Demand capacity and the policy specifies 50% Spot capacity, this means that half of your instances will be gradually terminated and relaunched as Spot Instances. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the old ones, so that updating your group does not compromise the performance or availability of your application.
Note the following about changing DesiredCapacity, MaxSize, or MinSize:
If a scale-in activity occurs as a result of a new DesiredCapacity value that is lower than the current size of the group, the Auto Scaling group uses its termination policy to determine which instances to terminate.
If you specify a new value for MinSize without specifying a value for DesiredCapacity, and the new MinSize is larger than the current size of the group, this sets the group's DesiredCapacity to the new MinSize value.
If you specify a new value for MaxSize without specifying a value for DesiredCapacity, and the new MaxSize is smaller than the current size of the group, this sets the group's DesiredCapacity to the new MaxSize value.
To see which parameters have been set, call the DescribeAutoScalingGroups API. To view the scaling policies for an Auto Scaling group, call the DescribePolicies API. If the group has scaling policies, you can update them by calling the PutScalingPolicy API.
Type: object
{
"LaunchConfigurationName" : "The name of the launch configuration. If you specify LaunchConfigurationName in your update request, you can't specify LaunchTemplate or MixedInstancesPolicy.",
"ServiceLinkedRoleARN" : "The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS services on your behalf. For more information, see Service-Linked Roles in the Amazon EC2 Auto Scaling User Guide.",
"AvailabilityZones" : [ "string" ],
"DesiredCapacity" : "The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the capacity it attempts to maintain. \nThis number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group.",
"HealthCheckGracePeriod" : "The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service. The default value is 0. \nFor more information, see Health Check Grace Period in the Amazon EC2 Auto Scaling User Guide. \nRequired if you are adding an ELB health check.",
"MaxSize" : "The maximum size of the Auto Scaling group. \nWith a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above MaxSize by more than your maximum instance weight (weights that define how many capacity units each instance contributes to the capacity of the group).",
"NewInstancesProtectedFromScaleIn" : "Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. \nFor more information about preventing instances from terminating on scale in, see Instance Protection in the Amazon EC2 Auto Scaling User Guide.",
"MinSize" : "The minimum size of the Auto Scaling group.",
"DefaultCooldown" : "The amount of time, in seconds, after a scaling activity completes before another scaling activity can start. The default value is 300. \nThis setting applies when using simple scaling policies, but not when using other scaling policies or scheduled scaling. For more information, see Scaling Cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.",
"TerminationPolicies" : [ "string" ],
"LaunchTemplate" : {
"LaunchTemplateName" : "The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API. \nYou must specify either a template ID or a template name.",
"Version" : "The version number, $Latest, or $Default. To get the version number, use the Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon EC2 CreateLaunchTemplateVersion API. \nIf the value is $Latest, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is $Default, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is $Default.",
"LaunchTemplateId" : "The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API. \nYou must specify either a template ID or a template name."
},
"AutoScalingGroupName" : "The name of the Auto Scaling group.",
"MixedInstancesPolicy" : {
"InstancesDistribution" : {
"OnDemandAllocationStrategy" : "Indicates how to allocate instance types to fulfill On-Demand capacity. \nThe only valid value is prioritized, which is also the default value. This strategy uses the order of instance type overrides for the LaunchTemplate to define the launch priority of each instance type. The first instance type in the array is prioritized higher than the last. If all your On-Demand capacity cannot be fulfilled using your highest priority instance, then the Auto Scaling groups launches the remaining capacity using the second priority instance type, and so on.",
"OnDemandBaseCapacity" : "The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. This base portion is provisioned first as your group scales. \nDefault if not set is 0. If you leave it set to 0, On-Demand Instances are launched as a percentage of the Auto Scaling group's desired capacity, per the OnDemandPercentageAboveBaseCapacity setting. \nAn update to this setting means a gradual replacement of instances to maintain the specified number of On-Demand Instances for your base capacity. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the old ones.",
"OnDemandPercentageAboveBaseCapacity" : "Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity beyond OnDemandBaseCapacity. \nDefault if not set is 100. If you leave it set to 100, the percentages are 100% for On-Demand Instances and 0% for Spot Instances. \nAn update to this setting means a gradual replacement of instances to maintain the percentage of On-Demand Instances for your additional capacity above the base capacity. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the old ones. \nValid Range: Minimum value of 0. Maximum value of 100.",
"SpotInstancePools" : "The number of Spot Instance pools across which to allocate your Spot Instances. The Spot pools are determined from the different instance types in the Overrides array of LaunchTemplate. Default if not set is 2. \nUsed only when the Spot allocation strategy is lowest-price. \nValid Range: Minimum value of 1. Maximum value of 20.",
"SpotAllocationStrategy" : "Indicates how to allocate instances across Spot Instance pools. \nIf the allocation strategy is lowest-price, the Auto Scaling group launches instances using the Spot pools with the lowest price, and evenly allocates your instances across the number of Spot pools that you specify. If the allocation strategy is capacity-optimized, the Auto Scaling group launches instances using Spot pools that are optimally chosen based on the available Spot capacity. \nThe default Spot allocation strategy for calls that you make through the API, the AWS CLI, or the AWS SDKs is lowest-price. The default Spot allocation strategy for the AWS Management Console is capacity-optimized. \nValid values: lowest-price | capacity-optimized ",
"SpotMaxPrice" : "The maximum price per unit hour that you are willing to pay for a Spot Instance. If you leave the value of this parameter blank (which is the default), the maximum Spot price is set at the On-Demand price. \nTo remove a value that you previously set, include the parameter but leave the value blank."
},
"LaunchTemplate" : {
"LaunchTemplateSpecification" : {
"LaunchTemplateName" : "The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API. \nYou must specify either a template ID or a template name.",
"Version" : "The version number, $Latest, or $Default. To get the version number, use the Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon EC2 CreateLaunchTemplateVersion API. \nIf the value is $Latest, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is $Default, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is $Default.",
"LaunchTemplateId" : "The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API. \nYou must specify either a template ID or a template name."
},
"Overrides" : [ {
"LaunchTemplateOverrides" : {
"WeightedCapacity" : "The number of capacity units, which gives the instance type a proportional weight to other instance types. For example, larger instance types are generally weighted more than smaller instance types. These are the same units that you chose to set the desired capacity in terms of instances, or a performance attribute such as vCPUs, memory, or I/O. \nFor more information, see Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide. \nValid Range: Minimum value of 1. Maximum value of 999.",
"InstanceType" : "The instance type. You must use an instance type that is supported in your requested Region and Availability Zones. \nFor information about available instance types, see Available Instance Types in the Amazon Elastic Compute Cloud User Guide. "
}
} ]
}
},
"VPCZoneIdentifier" : "A comma-separated list of subnet IDs for virtual private cloud (VPC). \nIf you specify VPCZoneIdentifier with AvailabilityZones, the subnets that you specify for this parameter must reside in those Availability Zones.",
"PlacementGroup" : "The name of the placement group into which to launch your instances, if any. A placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a placement group. For more information, see Placement Groups in the Amazon EC2 User Guide for Linux Instances.",
"HealthCheckType" : "The service to use for the health checks. The valid values are EC2 and ELB. If you configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy if it fails either the EC2 status checks or the load balancer health checks.",
"MaxInstanceLifetime" : "The maximum amount of time, in seconds, that an instance can be in service. The default is null. \nThis parameter is optional, but if you specify a value for it, you must specify a value of at least 604,800 seconds (7 days). To clear a previously set value, specify a new value of 0. \nFor more information, see Replacing Auto Scaling Instances Based on Maximum Instance Lifetime in the Amazon EC2 Auto Scaling User Guide. \nValid Range: Minimum value of 0."
}