Amazon S3 · Arazzo Workflow

Amazon S3 List and Batch Delete Objects

Version 1.0.0

List objects under a prefix then delete a batch of keys in one request.

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

Provider

amazon-s3

Workflows

list-and-batch-delete
List objects under a prefix then batch-delete a supplied set of keys.
Discovers objects under a prefix with ListObjectsV2 and removes a supplied set of keys with a single DeleteObjects request.
2 steps inputs: bucket, objectsToDelete, prefix outputs: deleted, errors, keyCount
1
listObjects
List the objects under the prefix so the caller can see what is about to be removed.
2
batchDelete
Delete the supplied set of keys in a single DeleteObjects request, using quiet mode so only errors are returned.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon S3 List and Batch Delete Objects
  summary: List objects under a prefix then delete a batch of keys in one request.
  description: >-
    A bulk cleanup flow for Amazon S3. The workflow lists the objects under a
    given prefix to discover what exists, then issues a single DeleteObjects
    request carrying the list of keys to remove. DeleteObjects can remove up to
    1,000 keys per call. 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: list-and-batch-delete
  summary: List objects under a prefix then batch-delete a supplied set of keys.
  description: >-
    Discovers objects under a prefix with ListObjectsV2 and removes a supplied
    set of keys with a single DeleteObjects request.
  inputs:
    type: object
    required:
    - bucket
    - prefix
    - objectsToDelete
    properties:
      bucket:
        type: string
        description: The bucket to list and delete from.
      prefix:
        type: string
        description: The key prefix to scope the listing to.
      objectsToDelete:
        type: array
        description: The list of objects to delete, each an object with a Key (and optional VersionId).
        items:
          type: object
          required:
          - Key
          properties:
            Key:
              type: string
              description: The key of an object to delete.
            VersionId:
              type: string
              description: An optional specific version of the object to delete.
  steps:
  - stepId: listObjects
    description: >-
      List the objects under the prefix so the caller can see what is about to be
      removed.
    operationId: ListObjectsV2
    parameters:
    - name: Bucket
      in: path
      value: $inputs.bucket
    - name: list-type
      in: query
      value: 2
    - name: prefix
      in: query
      value: $inputs.prefix
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      keyCount: $response.body#/KeyCount
  - stepId: batchDelete
    description: >-
      Delete the supplied set of keys in a single DeleteObjects request, using
      quiet mode so only errors are returned.
    operationId: DeleteObjects
    parameters:
    - name: Bucket
      in: path
      value: $inputs.bucket
    requestBody:
      contentType: application/xml
      payload:
        Object: $inputs.objectsToDelete
        Quiet: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deleted: $response.body#/Deleted
      errors: $response.body#/Error
  outputs:
    keyCount: $steps.listObjects.outputs.keyCount
    deleted: $steps.batchDelete.outputs.deleted
    errors: $steps.batchDelete.outputs.errors

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-list-and-batch-delete-objects-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.