BucktDocs

List S3 buckets

GET/v1/aws-accounts/{id}/s3-bucketsaws-accounts:readSDK: awsAccounts.listS3Buckets

Calls s3:ListAllMyBuckets in the connected AWS account and returns the result. Use this to discover the S3 buckets you can hand to Import buckets. Each id is the S3 bucket name itself.

Path parameters

NameTypeDefaultDescription
idrequiredstringThe AWS account record ID. Must be `active` (validated) for this call to succeed.

Query parameters

NameTypeDefaultDescription
cursorstringPagination cursor returned in `meta.nextCursor` from a previous request.
limitnumber20Page size. Range 1–100.

Example request

import { Buckt } from "@buckt/sdk";

const client = new Buckt({ apiKey: process.env.BUCKT_API_KEY });

const { data, meta } = await client.awsAccounts.listS3Buckets(
  "acc_01J5AAAAAAAAAAAAAAAAAAAAAA",
  { limit: 50 }
);

Responses

{
  "data": [
    {
      "object": "s3_bucket",
      "id": "company-marketing-assets",
      "creationDate": "2024-08-12T14:23:00Z"
    },
    {
      "object": "s3_bucket",
      "id": "company-user-uploads",
      "creationDate": "2025-02-04T09:01:00Z"
    }
  ],
  "error": null,
  "meta": {
    "nextCursor": null,
    "limit": 50,
    "total": 2
  }
}