Amazon RDS · Arazzo Workflow

Amazon RDS Add an Aurora Replica Instance

Version 1.0.0

Confirm a cluster is available, add a reader instance, and poll until it joins.

1 workflow 1 source API 1 provider
View Spec View on GitHub Cloud DatabasesDatabase ServiceDBaaSManaged DatabasesRelational DatabasesArazzoWorkflows

Provider

amazon-rds

Workflows

add-aurora-replica-instance
Add a reader instance to an Aurora cluster and wait for it to become available.
Confirms the cluster is available, creates an instance that joins the cluster as a reader, then polls DescribeDBInstances until the new instance is available.
3 steps inputs: dbClusterIdentifier, dbInstanceClass, dbInstanceIdentifier, engine outputs: endpointAddress, readerId, status
1
confirmCluster
describeDBClusters
Describe the Aurora DB cluster to confirm it is available before adding a reader instance.
2
createReader
createDBInstance
Create a new DB instance that joins the existing Aurora cluster as a reader, using the cluster engine and supplied instance class.
3
pollReader
describeDBInstances
Describe the new reader instance and inspect its status. While it is still creating the workflow loops back to poll again; once it is available the flow ends.

Source API Descriptions

Arazzo Workflow Specification

amazon-rds-add-aurora-replica-instance-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amazon RDS Add an Aurora Replica Instance
  summary: Confirm a cluster is available, add a reader instance, and poll until it joins.
  description: >-
    Scales read capacity on an Aurora DB cluster by adding a new reader instance
    into the existing cluster and waiting for it to come online. The workflow
    confirms the target cluster is available, creates a DB instance attached to
    the cluster, and polls DescribeDBInstances until the new reader reaches the
    available status, looping while it is still creating. Every step spells out
    its request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: amazonRdsApi
  url: ../openapi/amazon-rds-openapi.yml
  type: openapi
workflows:
- workflowId: add-aurora-replica-instance
  summary: Add a reader instance to an Aurora cluster and wait for it to become available.
  description: >-
    Confirms the cluster is available, creates an instance that joins the
    cluster as a reader, then polls DescribeDBInstances until the new instance
    is available.
  inputs:
    type: object
    required:
    - dbClusterIdentifier
    - dbInstanceIdentifier
    - dbInstanceClass
    - engine
    properties:
      dbClusterIdentifier:
        type: string
        description: The identifier of the existing Aurora DB cluster to add a reader to.
      dbInstanceIdentifier:
        type: string
        description: The unique identifier for the new reader DB instance.
      dbInstanceClass:
        type: string
        description: The compute and memory capacity class for the reader (e.g. db.r5.large).
      engine:
        type: string
        description: The Aurora engine matching the cluster (aurora-mysql, aurora-postgresql).
  steps:
  - stepId: confirmCluster
    description: >-
      Describe the Aurora DB cluster to confirm it is available before adding a
      reader instance.
    operationId: describeDBClusters
    parameters:
    - name: DBClusterIdentifier
      in: query
      value: $inputs.dbClusterIdentifier
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.dBClusters[0].status == 'available'
      type: jsonpath
    outputs:
      clusterStatus: $response.body#/dBClusters/0/status
  - stepId: createReader
    description: >-
      Create a new DB instance that joins the existing Aurora cluster as a
      reader, using the cluster engine and supplied instance class.
    operationId: createDBInstance
    parameters:
    - name: DBInstanceIdentifier
      in: query
      value: $inputs.dbInstanceIdentifier
    - name: DBInstanceClass
      in: query
      value: $inputs.dbInstanceClass
    - name: Engine
      in: query
      value: $inputs.engine
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      readerId: $response.body#/dBInstance/dBInstanceIdentifier
      initialStatus: $response.body#/dBInstance/dBInstanceStatus
  - stepId: pollReader
    description: >-
      Describe the new reader instance and inspect its status. While it is still
      creating the workflow loops back to poll again; once it is available the
      flow ends.
    operationId: describeDBInstances
    parameters:
    - name: DBInstanceIdentifier
      in: query
      value: $inputs.dbInstanceIdentifier
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/dBInstances/0/dBInstanceStatus
      endpointAddress: $response.body#/dBInstances/0/endpoint/address
    onSuccess:
    - name: stillCreating
      type: goto
      stepId: pollReader
      criteria:
      - context: $response.body
        condition: $.dBInstances[0].dBInstanceStatus != 'available'
        type: jsonpath
    - name: available
      type: end
      criteria:
      - context: $response.body
        condition: $.dBInstances[0].dBInstanceStatus == 'available'
        type: jsonpath
  outputs:
    readerId: $steps.createReader.outputs.readerId
    status: $steps.pollReader.outputs.status
    endpointAddress: $steps.pollReader.outputs.endpointAddress