Amazon S3 · Arazzo Workflow

Amazon S3 Empty and Delete a Bucket

Version 1.0.0

List the bucket, batch-delete its objects, then delete the empty bucket.

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

Provider

amazon-s3

Workflows

empty-and-delete-bucket
List, batch-delete objects, then delete the empty bucket.
Lists the bucket, removes the supplied keys with DeleteObjects, and deletes the bucket once it is empty.
3 steps inputs: bucket, objectsToDelete outputs: deleted, keyCount
1
listObjects
List the bucket contents to see what must be removed before the bucket can be deleted.
2
batchDelete
Delete the supplied keys in a single DeleteObjects request to empty the bucket.
3
deleteBucket
Delete the now-empty bucket. S3 responds with 204 No Content on success.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon S3 Empty and Delete a Bucket
  summary: List the bucket, batch-delete its objects, then delete the empty bucket.
  description: >-
    A full teardown flow for Amazon S3. A bucket cannot be deleted while it still
    contains objects, so the workflow first lists the objects, then removes a
    supplied set of keys with a single DeleteObjects request, and finally deletes
    the now-empty bucket. 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
  x-realizes-capability-ids:
  - BC-600.50
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-600.50
      capability_name: IT Infrastructure Management
      spec: amazon-s3-buckets-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: bucketsApi
  url: ../openapi/amazon-s3-buckets-api-openapi.yml
  type: openapi
- name: objectsApi
  url: ../openapi/amazon-s3-objects-api-openapi.yml
  type: openapi
workflows:
- workflowId: empty-and-delete-bucket
  summary: List, batch-delete objects, then delete the empty bucket.
  description: >-
    Lists the bucket, removes the supplied keys with DeleteObjects, and deletes
    the bucket once it is empty.
  inputs:
    type: object
    required:
    - bucket
    - objectsToDelete
    properties:
      bucket:
        type: string
        description: The bucket to empty and delete.
      objectsToDelete:
        type: array
        description: The list of objects to delete, each an object with a Key.
        items:
          type: object
          required:
          - Key
          properties:
            Key:
              type: string
            VersionId:
              type: string
  steps:
  - stepId: listObjects
    description: >-
      List the bucket contents to see what must be removed before the bucket can
      be deleted.
    operationId: ListObjectsV2
    parameters:
    - name: Bucket
      in: path
      value: $inputs.bucket
    - name: list-type
      in: query
      value: 2
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      keyCount: $response.body#/KeyCount
  - stepId: batchDelete
    description: >-
      Delete the supplied keys in a single DeleteObjects request to empty the
      bucket.
    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
  - stepId: deleteBucket
    description: >-
      Delete the now-empty bucket. S3 responds with 204 No Content on success.
    operationId: DeleteBucket
    parameters:
    - name: Bucket
      in: path
      value: $inputs.bucket
    successCriteria:
    - condition: $statusCode == 204
  outputs:
    keyCount: $steps.listObjects.outputs.keyCount
    deleted: $steps.batchDelete.outputs.deleted

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-empty-and-delete-bucket-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.