Amazon EC2 · Arazzo Workflow

Amazon EC2 Rotate Key Pair

Version 1.0.0

Verify a key pair exists, create its replacement, then delete the old key pair.

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

Provider

amazon-ec2

Workflows

rotate-key-pair
Replace an existing SSH key pair with a freshly created one.
Chains DescribeKeyPairs, CreateKeyPair, and DeleteKeyPair so the new key is in place before the old key is removed.
3 steps inputs: newKeyName, oldKeyName outputs: createStatus, deleteStatus
1
verifyOldKey
describeKeyPairs
Confirm the existing key pair is present before rotating.
2
createNewKey
createKeyPair
Create the replacement key pair.
3
deleteOldKey
deleteKeyPair
Delete the retired key pair now that its replacement exists.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon EC2 Rotate Key Pair
  summary: Verify a key pair exists, create its replacement, then delete the old key pair.
  description: >-
    Rotates an SSH key pair without leaving a gap in coverage. The workflow
    confirms the existing key pair is present, creates a new replacement key
    pair, and only then deletes the old key pair. 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: rotate-key-pair
  summary: Replace an existing SSH key pair with a freshly created one.
  description: >-
    Chains DescribeKeyPairs, CreateKeyPair, and DeleteKeyPair so the new key is
    in place before the old key is removed.
  inputs:
    type: object
    required:
    - oldKeyName
    - newKeyName
    properties:
      oldKeyName:
        type: string
        description: The name of the existing key pair to retire.
      newKeyName:
        type: string
        description: The name for the replacement key pair.
  steps:
  - stepId: verifyOldKey
    description: Confirm the existing key pair is present before rotating.
    operationId: describeKeyPairs
    parameters:
    - name: Action
      in: query
      value: DescribeKeyPairs
    - name: Version
      in: query
      value: '2016-11-15'
    - name: KeyName
      in: query
      value: $inputs.oldKeyName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      verifyStatus: $statusCode
  - stepId: createNewKey
    description: Create the replacement key pair.
    operationId: createKeyPair
    parameters:
    - name: Action
      in: query
      value: CreateKeyPair
    - name: Version
      in: query
      value: '2016-11-15'
    - name: KeyName
      in: query
      value: $inputs.newKeyName
    - name: KeyType
      in: query
      value: ed25519
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      createStatus: $statusCode
  - stepId: deleteOldKey
    description: Delete the retired key pair now that its replacement exists.
    operationId: deleteKeyPair
    parameters:
    - name: Action
      in: query
      value: DeleteKeyPair
    - name: Version
      in: query
      value: '2016-11-15'
    - name: KeyName
      in: query
      value: $inputs.oldKeyName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deleteStatus: $statusCode
  outputs:
    createStatus: $steps.createNewKey.outputs.createStatus
    deleteStatus: $steps.deleteOldKey.outputs.deleteStatus

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-rotate-key-pair-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.