Amazon EC2 · Arazzo Workflow

Amazon EC2 Release Elastic IP on Terminate

Version 1.0.0

Terminate an instance, wait until terminated, then release its Elastic IP.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Cloud ComputingComputeInfrastructure-as-a-ServiceInfrastructureVirtual MachinesArazzoWorkflows

Provider

amazon-ec2

Workflows

release-eip-on-terminate
Terminate an instance and release its Elastic IP once it is gone.
Chains TerminateInstances, a DescribeInstances poll loop branching on the terminated state, and ReleaseAddress to reclaim the Elastic IP allocation.
3 steps inputs: allocationId, instanceId outputs: finalState, releaseStatus
1
terminateInstance
Terminate the target instance.
2
pollTerminated
Describe the instance and branch on its state, looping while shutting-down and proceeding to release once it reports terminated.
3
releaseAddress
Release the Elastic IP allocation back to the pool.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon EC2 Release Elastic IP on Terminate
  summary: Terminate an instance, wait until terminated, then release its Elastic IP.
  description: >-
    Avoids paying for an idle Elastic IP after an instance is gone. The workflow
    terminates the instance, polls DescribeInstances until the instance reports
    the terminated state, and then releases the Elastic IP allocation. The poll
    step branches on the instance state name, looping while shutting-down and
    releasing once terminated. Every step spells out its request inline using the
    Amazon EC2 query protocol (Action and Version parameters) so the flow can be
    read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: elasticIpsApi
  url: ../openapi/amazon-ec2-elastic-ips-api-openapi.yml
  type: openapi
- name: instancesApi
  url: ../openapi/amazon-ec2-instances-api-openapi.yml
  type: openapi
workflows:
- workflowId: release-eip-on-terminate
  summary: Terminate an instance and release its Elastic IP once it is gone.
  description: >-
    Chains TerminateInstances, a DescribeInstances poll loop branching on the
    terminated state, and ReleaseAddress to reclaim the Elastic IP allocation.
  inputs:
    type: object
    required:
    - instanceId
    - allocationId
    properties:
      instanceId:
        type: string
        description: The ID of the instance to terminate.
      allocationId:
        type: string
        description: The allocation ID of the Elastic IP to release.
  steps:
  - stepId: terminateInstance
    description: Terminate the target instance.
    operationId: terminateInstances
    parameters:
    - name: Action
      in: query
      value: TerminateInstances
    - name: Version
      in: query
      value: '2016-11-15'
    - name: InstanceId
      in: query
      value: $inputs.instanceId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      terminateStatus: $statusCode
  - stepId: pollTerminated
    description: >-
      Describe the instance and branch on its state, looping while shutting-down
      and proceeding to release once it reports terminated.
    operationId: describeInstances
    parameters:
    - name: Action
      in: query
      value: DescribeInstances
    - name: Version
      in: query
      value: '2016-11-15'
    - name: InstanceId
      in: query
      value: $inputs.instanceId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      state: $response.body#/reservationSet/0/instancesSet/0/instanceState/name
    onSuccess:
    - name: stillShuttingDown
      type: goto
      stepId: pollTerminated
      criteria:
      - context: $response.body
        condition: $.reservationSet[0].instancesSet[0].instanceState.name == 'shutting-down'
        type: jsonpath
    - name: gone
      type: goto
      stepId: releaseAddress
      criteria:
      - context: $response.body
        condition: $.reservationSet[0].instancesSet[0].instanceState.name == 'terminated'
        type: jsonpath
  - stepId: releaseAddress
    description: Release the Elastic IP allocation back to the pool.
    operationId: releaseAddress
    parameters:
    - name: Action
      in: query
      value: ReleaseAddress
    - name: Version
      in: query
      value: '2016-11-15'
    - name: AllocationId
      in: query
      value: $inputs.allocationId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      releaseStatus: $statusCode
  outputs:
    finalState: $steps.pollTerminated.outputs.state
    releaseStatus: $steps.releaseAddress.outputs.releaseStatus

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-release-eip-on-terminate-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.