BucktDocs

List AWS accounts

GET/v1/aws-accountsaws-accounts:readSDK: awsAccounts.list

Returns every connected AWS account in the organization, including those still in pending setup. The meta.total count reflects the full set, not just the current page.

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.list({ limit: 50 });

Responses

{
  "data": [
    {
      "object": "aws_account",
      "id": "acc_01J5AAAAAAAAAAAAAAAAAAAAAA",
      "awsAccountId": "123456789012",
      "externalId": "0a1b2c3d-4e5f-6789-abcd-ef0123456789",
      "roleArn": "arn:aws:iam::123456789012:role/BucktAccess",
      "stackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/buckt-byoa/abc123",
      "label": "Production AWS",
      "status": "active",
      "lastValidatedAt": "2026-04-25T11:30:00Z",
      "createdAt": "2026-04-20T10:00:00Z",
      "updatedAt": "2026-04-25T11:30:00Z"
    },
    {
      "object": "aws_account",
      "id": "acc_01J5BBBBBBBBBBBBBBBBBBBBBB",
      "awsAccountId": "pending-9f8e7d6c",
      "externalId": "f0e1d2c3-b4a5-9876-5432-1fedcba01234",
      "roleArn": null,
      "stackId": null,
      "label": "Staging AWS",
      "status": "pending",
      "lastValidatedAt": null,
      "createdAt": "2026-04-25T10:00:00Z",
      "updatedAt": "2026-04-25T10:00:00Z"
    }
  ],
  "error": null,
  "meta": {
    "nextCursor": null,
    "limit": 50,
    "total": 2
  }
}