Amazon EFS · Arazzo Workflow

Amazon EFS Multi-AZ Mount Targets

Version 1.0.0

Create a file system, wait until available, then attach mount targets in two Availability Zones.

1 workflow 1 source API 1 provider
View Spec View on GitHub Amazon Web ServicesEFSElastic File SystemFile StorageNFSServerlessStorageArazzoWorkflows

Provider

amazon-efs

Workflows

multi-az-mount-targets
Provision a file system and attach mount targets in two subnets across Availability Zones.
Creates an EFS file system, waits for it to become available, and creates two mount targets in two different subnets so the file system is mountable from multiple Availability Zones.
4 steps inputs: creationToken, primarySubnetId, secondarySubnetId, securityGroups, throughputMode outputs: fileSystemId, primaryMountTargetId, secondaryMountTargetId
1
createFileSystem
createFileSystem
Create the file system using the supplied idempotent creation token.
2
waitForAvailable
describeFileSystems
Poll the file system until its LifeCycleState reports available so mount targets can be created.
3
createPrimaryMountTarget
createMountTarget
Create the first mount target in the primary subnet.
4
createSecondaryMountTarget
createMountTarget
Create the second mount target in a subnet from a different Availability Zone for cross-AZ availability.

Source API Descriptions

Arazzo Workflow Specification

amazon-efs-multi-az-mount-targets-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amazon EFS Multi-AZ Mount Targets
  summary: Create a file system, wait until available, then attach mount targets in two Availability Zones.
  description: >-
    Builds a highly available Amazon EFS deployment. The workflow creates a file
    system, polls until it reaches the available lifecycle state, then creates a
    mount target in a primary subnet and a second mount target in a subnet from a
    different Availability Zone so the file system is reachable across two AZs.
    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: amazonEfsApi
  url: ../openapi/amazon-efs-openapi.yml
  type: openapi
workflows:
- workflowId: multi-az-mount-targets
  summary: Provision a file system and attach mount targets in two subnets across Availability Zones.
  description: >-
    Creates an EFS file system, waits for it to become available, and creates
    two mount targets in two different subnets so the file system is mountable
    from multiple Availability Zones.
  inputs:
    type: object
    required:
    - creationToken
    - primarySubnetId
    - secondarySubnetId
    properties:
      creationToken:
        type: string
        description: A string of up to 64 ASCII characters used to ensure idempotent creation.
      throughputMode:
        type: string
        description: The throughput mode for the file system (bursting, provisioned, or elastic).
      primarySubnetId:
        type: string
        description: The ID of the subnet for the first mount target.
      secondarySubnetId:
        type: string
        description: The ID of the subnet in a second Availability Zone for the second mount target.
      securityGroups:
        type: array
        description: Up to five VPC security group IDs to associate with each mount target.
        items:
          type: string
  steps:
  - stepId: createFileSystem
    description: >-
      Create the file system using the supplied idempotent creation token.
    operationId: createFileSystem
    requestBody:
      contentType: application/json
      payload:
        CreationToken: $inputs.creationToken
        ThroughputMode: $inputs.throughputMode
        Encrypted: true
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      fileSystemId: $response.body#/FileSystemId
  - stepId: waitForAvailable
    description: >-
      Poll the file system until its LifeCycleState reports available so mount
      targets can be created.
    operationId: describeFileSystems
    parameters:
    - name: FileSystemId
      in: query
      value: $steps.createFileSystem.outputs.fileSystemId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.FileSystems[0].LifeCycleState == "available"
      type: jsonpath
    outputs:
      lifeCycleState: $response.body#/FileSystems/0/LifeCycleState
  - stepId: createPrimaryMountTarget
    description: >-
      Create the first mount target in the primary subnet.
    operationId: createMountTarget
    requestBody:
      contentType: application/json
      payload:
        FileSystemId: $steps.createFileSystem.outputs.fileSystemId
        SubnetId: $inputs.primarySubnetId
        SecurityGroups: $inputs.securityGroups
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      mountTargetId: $response.body#/MountTargetId
      availabilityZoneName: $response.body#/AvailabilityZoneName
  - stepId: createSecondaryMountTarget
    description: >-
      Create the second mount target in a subnet from a different Availability
      Zone for cross-AZ availability.
    operationId: createMountTarget
    requestBody:
      contentType: application/json
      payload:
        FileSystemId: $steps.createFileSystem.outputs.fileSystemId
        SubnetId: $inputs.secondarySubnetId
        SecurityGroups: $inputs.securityGroups
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      mountTargetId: $response.body#/MountTargetId
      availabilityZoneName: $response.body#/AvailabilityZoneName
  outputs:
    fileSystemId: $steps.createFileSystem.outputs.fileSystemId
    primaryMountTargetId: $steps.createPrimaryMountTarget.outputs.mountTargetId
    secondaryMountTargetId: $steps.createSecondaryMountTarget.outputs.mountTargetId