Amazon EC2 Auto Scaling Ec2 Auto Scaling Lifecycle Hook API

The Ec2 Auto Scaling Lifecycle Hook API from Amazon EC2 Auto Scaling — 3 operation(s) for ec2 auto scaling lifecycle hook.

GitHub OpenAPI

Operations 3

POST /?Action=DeleteLifecycleHook Delete Lifecycle Hook #
POST /?Action=DescribeLifecycleHooks Describe Lifecycle Hooks #
POST /?Action=PutLifecycleHook Put Lifecycle Hook #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/amazon-ec2-auto-scaling:amazon-ec2-auto-scaling-lifecycle-hook-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

amazon-ec2-auto-scaling-lifecycle-hook-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Auto Scaling Lifecycle Hook API
  version: '2011-01-01'
  description: Generated from AWS's published Smithy model for Auto Scaling. 3 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://autoscaling.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /?Action=DeleteLifecycleHook:
    post:
      operationId: DeleteLifecycleHook
      summary: Delete Lifecycle Hook
      description: Deletes the specified lifecycle hook. If there are any outstanding lifecycle actions, they are completed
        first (ABANDON for launching instances, CONTINUE for terminating instances).
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/DeleteLifecycleHookAnswer'
        '500':
          description: ResourceContentionFault
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ResourceContentionFault'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: DeleteLifecycleHook
                  Version:
                    type: string
                    const: '2011-01-01'
              - $ref: '#/components/schemas/DeleteLifecycleHookType'
            example:
              LifecycleHookName: my-lifecycle-hook
              AutoScalingGroupName: my-auto-scaling-group
      tags:
      - Lifecycle Hook
  /?Action=DescribeLifecycleHooks:
    post:
      operationId: DescribeLifecycleHooks
      summary: Describe Lifecycle Hooks
      description: Gets information about the lifecycle hooks for the specified Auto Scaling group.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/DescribeLifecycleHooksAnswer'
              example:
                LifecycleHooks:
                - GlobalTimeout: 172800
                  HeartbeatTimeout: 3600
                  RoleARN: arn:aws:iam::123456789012:role/my-auto-scaling-role
                  AutoScalingGroupName: my-auto-scaling-group
                  LifecycleHookName: my-lifecycle-hook
                  DefaultResult: ABANDON
                  NotificationTargetARN: arn:aws:sns:us-west-2:123456789012:my-sns-topic
                  LifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
        '500':
          description: ResourceContentionFault
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ResourceContentionFault'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: DescribeLifecycleHooks
                  Version:
                    type: string
                    const: '2011-01-01'
              - $ref: '#/components/schemas/DescribeLifecycleHooksType'
            example:
              AutoScalingGroupName: my-auto-scaling-group
      tags:
      - Lifecycle Hook
  /?Action=PutLifecycleHook:
    post:
      operationId: PutLifecycleHook
      summary: Put Lifecycle Hook
      description: 'Creates or updates a lifecycle hook for the specified Auto Scaling group. Lifecycle hooks let you create
        solutions that are aware of events in the Auto Scaling instance lifecycle, and then perform a custom action on instances
        when the corresponding lifecycle event occurs. This step is a part of the procedure for adding a lifecycle hook to
        an Auto Scaling group: (Optional) Create a launch template or launch configuration with a user data script that runs
        while an instance is in a wait state due to a lifecycle hook. (Optional) Create a Lambda function and a rule that
        allows Amazon EventBridge to invoke your Lambda function when an instance is put into a wait state due to a lifecycle
        hook. (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 wait state using the RecordLifecycleActionHeartbeat
        API call. If you finish before the timeout period'
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/PutLifecycleHookAnswer'
        '400':
          description: LimitExceededFault
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/LimitExceededFault'
        '500':
          description: ResourceContentionFault
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ResourceContentionFault'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: PutLifecycleHook
                  Version:
                    type: string
                    const: '2011-01-01'
              - $ref: '#/components/schemas/PutLifecycleHookType'
            example:
              LifecycleHookName: my-launch-lifecycle-hook
              HeartbeatTimeout: 300
              AutoScalingGroupName: my-auto-scaling-group
              LifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
              DefaultResult: CONTINUE
      tags:
      - Lifecycle Hook
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: autoscaling
  schemas:
    DeleteLifecycleHookAnswer:
      type: object
      properties: {}
    DeleteLifecycleHookType:
      type: object
      properties:
        LifecycleHookName:
          type: string
          description: The name of the lifecycle hook.
        AutoScalingGroupName:
          type: string
          description: The name of the Auto Scaling group.
      required:
      - LifecycleHookName
      - AutoScalingGroupName
    DescribeLifecycleHooksAnswer:
      type: object
      properties:
        LifecycleHooks:
          type: array
          items:
            $ref: '#/components/schemas/LifecycleHook'
          description: The lifecycle hooks for the specified group.
    DescribeLifecycleHooksType:
      type: object
      properties:
        AutoScalingGroupName:
          type: string
          description: The name of the Auto Scaling group.
        LifecycleHookNames:
          type: array
          items:
            type: string
          description: The names of one or more lifecycle hooks. If you omit this property, all lifecycle hooks are described.
      required:
      - AutoScalingGroupName
    LifecycleHook:
      type: object
      properties:
        LifecycleHookName:
          type: string
          description: The name of the lifecycle hook.
        AutoScalingGroupName:
          type: string
          description: The name of the Auto Scaling group for the lifecycle hook.
        LifecycleTransition:
          type: string
          description: 'The lifecycle transition. Valid values: autoscaling:EC2_INSTANCE_LAUNCHING | autoscaling:EC2_INSTANCE_TERMINATING'
        NotificationTargetARN:
          type: string
          description: The ARN of the target that Amazon EC2 Auto Scaling sends notifications to when an instance is in a
            wait state for the lifecycle hook.
        RoleARN:
          type: string
          description: The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification
            target (an Amazon SNS topic or an Amazon SQS queue).
        NotificationMetadata:
          type: string
          description: Additional information that is included any time Amazon EC2 Auto Scaling sends a message to the notification
            target.
        HeartbeatTimeout:
          type: integer
          description: The maximum time, in seconds, that can elapse before the lifecycle hook times out. If the lifecycle
            hook times out, Amazon EC2 Auto Scaling performs the action that you specified in the DefaultResult property.
        GlobalTimeout:
          type: integer
          description: The maximum time, in seconds, that an instance can remain in a wait state. The maximum is 172800 seconds
            (48 hours) or 100 times HeartbeatTimeout, whichever is smaller.
        DefaultResult:
          type: string
          description: 'The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected
            failure occurs. Valid values: CONTINUE | ABANDON'
    LimitExceededFault:
      type: object
      properties:
        message:
          type: string
    PutLifecycleHookAnswer:
      type: object
      properties: {}
    PutLifecycleHookType:
      type: object
      properties:
        LifecycleHookName:
          type: string
          description: The name of the lifecycle hook.
        AutoScalingGroupName:
          type: string
          description: The name of the Auto Scaling group.
        LifecycleTransition:
          type: string
          description: The lifecycle transition. For Auto Scaling groups, there are two major lifecycle transitions. To create
            a lifecycle hook for scale-out events, specify autoscaling:EC2_INSTANCE_LAUNCHING. To create a lifecycle hook
            for scale-in events, specify autoscaling:EC2_INSTANCE_TERMINATING. Required for new lifecycle hooks, but optional
            when updating existing hooks.
        RoleARN:
          type: string
          description: The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification
            target. Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue. Required for new
            lifecycle hooks, but optional when updating existing hooks.
        NotificationTargetARN:
          type: string
          description: The Amazon Resource Name (ARN) of the notification target that Amazon EC2 Auto Scaling uses to notify
            you when an instance is in a wait state for the lifecycle hook. You can specify either an Amazon SNS topic or
            an Amazon SQS queue. If you specify an empty string, this overrides the current ARN. This 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. When you specify a notification target, Amazon EC2 Auto Scaling sends it a test message.
            Test messages contain the following addit
        NotificationMetadata:
          type: string
          description: Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to
            the notification target.
        HeartbeatTimeout:
          type: integer
          description: 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).
        DefaultResult:
          type: string
          description: 'The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected
            failure occurs. The default value is ABANDON. Valid values: CONTINUE | ABANDON'
      required:
      - LifecycleHookName
      - AutoScalingGroupName
    ResourceContentionFault:
      type: object
      properties:
        message:
          type: string
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/auto-scaling/service/2011-01-01/auto-scaling-2011-01-01.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)