Amazon EC2 · Arazzo Workflow

Amazon EC2 Stop and Start Instance Cycle

Version 1.0.0

Stop an instance, wait until stopped, then start it again and confirm running.

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

Provider

amazon-ec2

Workflows

stop-start-instance-cycle
Cycle an instance through stopped and back to running.
Chains StopInstances, a stopped-state poll, StartInstances, and a running-state poll, each branching on the instance state name.
4 steps inputs: instanceId outputs: finalState
1
stopInstance
stopInstances
Stop the target instance.
2
pollStopped
describeInstances
Describe the instance and branch on its state, looping while stopping and proceeding once it reports stopped.
3
startInstance
startInstances
Start the stopped instance again.
4
pollRunning
describeInstances
Describe the instance and branch on its state, looping while pending and ending once it reports running.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon EC2 Stop and Start Instance Cycle
  summary: Stop an instance, wait until stopped, then start it again and confirm running.
  description: >-
    Performs a full stop and start cycle, useful for changing instance
    attributes that require a stop. The workflow stops the instance, polls
    DescribeInstances until it reports stopped, starts it again, and confirms it
    returns to running. The poll steps branch on the instance state name. 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: amazonEc2Api
  url: ../openapi/amazon-ec2-openapi.yml
  type: openapi
workflows:
- workflowId: stop-start-instance-cycle
  summary: Cycle an instance through stopped and back to running.
  description: >-
    Chains StopInstances, a stopped-state poll, StartInstances, and a
    running-state poll, each branching on the instance state name.
  inputs:
    type: object
    required:
    - instanceId
    properties:
      instanceId:
        type: string
        description: The ID of the instance to stop and restart.
  steps:
  - stepId: stopInstance
    description: Stop the target instance.
    operationId: stopInstances
    parameters:
    - name: Action
      in: query
      value: StopInstances
    - name: Version
      in: query
      value: '2016-11-15'
    - name: InstanceId
      in: query
      value: $inputs.instanceId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      stopStatus: $statusCode
  - stepId: pollStopped
    description: >-
      Describe the instance and branch on its state, looping while stopping and
      proceeding once it reports stopped.
    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: stillStopping
      type: goto
      stepId: pollStopped
      criteria:
      - context: $response.body
        condition: $.reservationSet[0].instancesSet[0].instanceState.name == 'stopping'
        type: jsonpath
    - name: nowStopped
      type: goto
      stepId: startInstance
      criteria:
      - context: $response.body
        condition: $.reservationSet[0].instancesSet[0].instanceState.name == 'stopped'
        type: jsonpath
  - stepId: startInstance
    description: Start the stopped instance again.
    operationId: startInstances
    parameters:
    - name: Action
      in: query
      value: StartInstances
    - name: Version
      in: query
      value: '2016-11-15'
    - name: InstanceId
      in: query
      value: $inputs.instanceId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      startStatus: $statusCode
  - stepId: pollRunning
    description: >-
      Describe the instance and branch on its state, looping while pending and
      ending once it reports running.
    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: stillStarting
      type: goto
      stepId: pollRunning
      criteria:
      - context: $response.body
        condition: $.reservationSet[0].instancesSet[0].instanceState.name == 'pending'
        type: jsonpath
    - name: nowRunning
      type: end
      criteria:
      - context: $response.body
        condition: $.reservationSet[0].instancesSet[0].instanceState.name == 'running'
        type: jsonpath
  outputs:
    finalState: $steps.pollRunning.outputs.state

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-stop-start-instance-cycle-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 email required.

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