Skip to main content

lifecycle_hook

Gets an individual lifecycle_hook resource

Overview

Namelifecycle_hook
TypeResource
Descriptionlifecycle_hook
Idawscc.autoscaling.lifecycle_hook

Fields

NameDatatypeDescription
auto_scaling_group_namestringThe name of the Auto Scaling group for the lifecycle hook.
default_resultstringThe action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. The valid values are CONTINUE and ABANDON (default).
heartbeat_timeoutintegerThe 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). If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action that you specified in the DefaultResult property.
lifecycle_hook_namestringThe name of the lifecycle hook.
lifecycle_transitionstringThe instance state to which you want to attach the lifecycle hook.
notification_metadatastringAdditional information that is included any time Amazon EC2 Auto Scaling sends a message to the notification target.
notification_target_arnstringThe Amazon Resource Name (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. You can specify an Amazon SQS queue or an Amazon SNS topic. The notification message includes the following information: lifecycle action token, user account ID, Auto Scaling group name, lifecycle hook name, instance ID, lifecycle transition, and notification metadata.
role_arnstringThe 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.
regionstringAWS region.

Methods

Currently only SELECT is supported for this resource resource.

Example

SELECT
region,
auto_scaling_group_name,
default_result,
heartbeat_timeout,
lifecycle_hook_name,
lifecycle_transition,
notification_metadata,
notification_target_arn,
role_arn
FROM awscc.autoscaling.lifecycle_hook
WHERE data__Identifier = '<AutoScalingGroupName>|<LifecycleHookName>';

Permissions

To operate on the lifecycle_hook resource, the following permissions are required:

Read

autoscaling:DescribeLifecycleHooks

Update

autoscaling:PutLifecycleHook,
autoscaling:DescribeLifecycleHooks,
iam:PassRole

Delete

autoscaling:DeleteLifecycleHook,
autoscaling:DescribeLifecycleHooks