Amazon S3 · Arazzo Workflow

Amazon S3 Conditional Download of an Object

Version 1.0.0

HEAD an object to read its ETag, then GET it only when it is present.

1 workflow 1 source API 1 provider
View Spec View on GitHub ArchiveBackupCloud StorageData StorageObject StorageScalable StorageArazzoWorkflows

Provider

amazon-s3

Workflows

conditional-download-object
HEAD then GET an object, downloading only when it exists.
Probes an object with HeadObject and downloads it with GetObject only when the HEAD reports it is present.
2 steps inputs: bucket, objectKey outputs: downloadedEtag, headEtag
1
headObject
HEAD the object to learn its ETag and size before deciding to download.
2
getObject
Download the full object body now that the HEAD confirmed it exists.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon S3 Conditional Download of an Object
  summary: HEAD an object to read its ETag, then GET it only when it is present.
  description: >-
    A safe read flow for Amazon S3. The workflow issues a HEAD request to learn
    an object's ETag and size without transferring its bytes, and branches: when
    the object exists it proceeds to GET the full body, and when the object is
    missing it ends without downloading anything. 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: objectsApi
  url: ../openapi/amazon-s3-objects-api-openapi.yml
  type: openapi
workflows:
- workflowId: conditional-download-object
  summary: HEAD then GET an object, downloading only when it exists.
  description: >-
    Probes an object with HeadObject and downloads it with GetObject only when
    the HEAD reports it is present.
  inputs:
    type: object
    required:
    - bucket
    - objectKey
    properties:
      bucket:
        type: string
        description: The bucket holding the object.
      objectKey:
        type: string
        description: The key of the object to download.
  steps:
  - stepId: headObject
    description: >-
      HEAD the object to learn its ETag and size before deciding to download.
    operationId: HeadObject
    parameters:
    - name: Bucket
      in: path
      value: $inputs.bucket
    - name: Key+
      in: path
      value: $inputs.objectKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      etag: $response.header.ETag
    onSuccess:
    - name: present
      type: goto
      stepId: getObject
      criteria:
      - condition: $statusCode == 200
    onFailure:
    - name: missing
      type: end
      criteria:
      - condition: $statusCode == 404
  - stepId: getObject
    description: >-
      Download the full object body now that the HEAD confirmed it exists.
    operationId: GetObject
    parameters:
    - name: Bucket
      in: path
      value: $inputs.bucket
    - name: Key+
      in: path
      value: $inputs.objectKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      etag: $response.header.ETag
      contentLength: $response.header.Content-Length
  outputs:
    headEtag: $steps.headObject.outputs.etag
    downloadedEtag: $steps.getObject.outputs.etag

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-s3-conditional-download-object-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.