Amazon EC2 Auto Scaling · Arazzo Workflow

Amazon EC2 Auto Scaling Register Lifecycle Hook and Complete Action

Version 1.0.0

Add a lifecycle hook to a group, confirm it, and complete a pending lifecycle action.

1 workflow 3 source APIs 1 provider
View Spec View on GitHub Amazon Web ServicesAuto-ScalingComputeEC2High AvailabilityScalingArazzoWorkflows

Provider

amazon-ec2-auto-scaling

Workflows

register-lifecycle-hook-and-complete-action
Create a lifecycle hook, verify it, and complete a pending lifecycle action.
Puts a lifecycle hook on the group, confirms it via describe, and completes a pending lifecycle action for an instance.
3 steps inputs: autoScalingGroupName, heartbeatTimeout, instanceId, lifecycleActionResult, lifecycleActionToken, lifecycleHookName, lifecycleTransition, notificationTargetArn, roleArn outputs: completeStatus, registeredHookName
1
putLifecycleHook
Create or update the lifecycle hook on the Auto Scaling group.
2
describeLifecycleHooks
Describe the group's lifecycle hooks to confirm the new hook is registered and capture its transition and timeout.
3
completeLifecycleAction
Complete a pending lifecycle action for the instance with the supplied result so the instance can proceed.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon EC2 Auto Scaling Register Lifecycle Hook and Complete Action
  summary: Add a lifecycle hook to a group, confirm it, and complete a pending lifecycle action.
  description: >-
    Sets up an instance lifecycle hook and resolves a wait-state action. The
    workflow puts a lifecycle hook on the group, describes the group's lifecycle
    hooks to confirm registration and capture the hook details, and then
    completes a pending lifecycle action for a specific instance with the
    supplied result so the instance can proceed through its lifecycle. Every
    step spells out the AWS query-protocol Action and Version inline so the flow
    can be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: actionCompletelifecycleactionApi
  url: ../openapi/amazon-ec2-auto-scaling-action-completelifecycleaction-api-openapi.yml
  type: openapi
- name: actionDescribelifecyclehooksApi
  url: ../openapi/amazon-ec2-auto-scaling-action-describelifecyclehooks-api-openapi.yml
  type: openapi
- name: actionPutlifecyclehookApi
  url: ../openapi/amazon-ec2-auto-scaling-action-putlifecyclehook-api-openapi.yml
  type: openapi
workflows:
- workflowId: register-lifecycle-hook-and-complete-action
  summary: Create a lifecycle hook, verify it, and complete a pending lifecycle action.
  description: >-
    Puts a lifecycle hook on the group, confirms it via describe, and completes
    a pending lifecycle action for an instance.
  inputs:
    type: object
    required:
    - autoScalingGroupName
    - lifecycleHookName
    - lifecycleActionResult
    properties:
      autoScalingGroupName:
        type: string
        description: The name of the Auto Scaling group.
      lifecycleHookName:
        type: string
        description: The name of the lifecycle hook.
      lifecycleTransition:
        type: string
        description: The lifecycle transition (autoscaling:EC2_INSTANCE_LAUNCHING or autoscaling:EC2_INSTANCE_TERMINATING).
      roleArn:
        type: string
        description: The ARN of the IAM role that allows the group to publish to the notification target.
      notificationTargetArn:
        type: string
        description: The ARN of the Amazon SNS topic or SQS queue notification target.
      heartbeatTimeout:
        type: integer
        description: The maximum time, in seconds, before the lifecycle hook times out (30 to 7200).
      lifecycleActionResult:
        type: string
        description: The action for the group to take when completing the lifecycle action (CONTINUE or ABANDON).
      lifecycleActionToken:
        type: string
        description: The UUID token identifying the specific lifecycle action to complete.
      instanceId:
        type: string
        description: The ID of the instance whose lifecycle action is being completed.
  steps:
  - stepId: putLifecycleHook
    description: >-
      Create or update the lifecycle hook on the Auto Scaling group.
    operationId: POST_PutLifecycleHook
    parameters:
    - name: Action
      in: query
      value: PutLifecycleHook
    - name: Version
      in: query
      value: 2011-01-01
    requestBody:
      contentType: text/xml
      payload:
        LifecycleHookName: $inputs.lifecycleHookName
        AutoScalingGroupName: $inputs.autoScalingGroupName
        LifecycleTransition: $inputs.lifecycleTransition
        RoleARN: $inputs.roleArn
        NotificationTargetARN: $inputs.notificationTargetArn
        HeartbeatTimeout: $inputs.heartbeatTimeout
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      putStatus: $statusCode
  - stepId: describeLifecycleHooks
    description: >-
      Describe the group's lifecycle hooks to confirm the new hook is registered
      and capture its transition and timeout.
    operationId: POST_DescribeLifecycleHooks
    parameters:
    - name: Action
      in: query
      value: DescribeLifecycleHooks
    - name: Version
      in: query
      value: 2011-01-01
    requestBody:
      contentType: text/xml
      payload:
        AutoScalingGroupName: $inputs.autoScalingGroupName
        LifecycleHookNames:
        - $inputs.lifecycleHookName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      registeredHookName: $response.body#/LifecycleHooks/0/LifecycleHookName
      registeredTransition: $response.body#/LifecycleHooks/0/LifecycleTransition
      globalTimeout: $response.body#/LifecycleHooks/0/GlobalTimeout
    onSuccess:
    - name: hookRegistered
      type: goto
      stepId: completeLifecycleAction
      criteria:
      - context: $response.body
        condition: $.LifecycleHooks.length > 0
        type: jsonpath
  - stepId: completeLifecycleAction
    description: >-
      Complete a pending lifecycle action for the instance with the supplied
      result so the instance can proceed.
    operationId: POST_CompleteLifecycleAction
    parameters:
    - name: Action
      in: query
      value: CompleteLifecycleAction
    - name: Version
      in: query
      value: 2011-01-01
    requestBody:
      contentType: text/xml
      payload:
        LifecycleHookName: $inputs.lifecycleHookName
        AutoScalingGroupName: $inputs.autoScalingGroupName
        LifecycleActionResult: $inputs.lifecycleActionResult
        LifecycleActionToken: $inputs.lifecycleActionToken
        InstanceId: $inputs.instanceId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      completeStatus: $statusCode
  outputs:
    registeredHookName: $steps.describeLifecycleHooks.outputs.registeredHookName
    completeStatus: $steps.completeLifecycleAction.outputs.completeStatus

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/amazon-ec2-auto-scaling-register-lifecycle-hook-and-complete-action-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.