List all available S3 buckets.

Parameters:

Parameters:
See dedicated page for more information.
Lists all S3 buckets that the provided AWS keys can see.
Use the same credentials you set up in S3 Upload File (we already documented a step-by-step there).
Where it’s handy
Attach a policy like this to the IAM user/role you’ll use:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListAllBuckets",
"Effect": "Allow",
"Action": ["s3:ListAllMyBuckets"],
"Resource": "*"
},
{
"Sid": "BucketLocation",
"Effect": "Allow",
"Action": ["s3:GetBucketLocation"],
"Resource": "*"
}
]
}
Want to keep it even tighter? Replace
"Resource": "*"in the second statement with the specific bucket ARNs you care about.

This action doesn’t require a region or bucket name because it lists all buckets visible to the keys.
S3 ListBucket.A result grid with at least:
BucketName — the bucket’s nameCreationDate — ISO timestampRegion — appears if the action was able to call GetBucketLocationExample (illustrative):
| BucketName | CreationDate | Region |
|---|---|---|
| my-logs | 2025-01-12T08:13:55Z | eu-west-3 |
| app-uploads | 2024-10-03T19:44:27Z | eu-north-1 |
| analytics-raw | 2023-05-21T06:11:09Z | us-east-1 |
| Symptom (in Log/Data) | Likely cause | Fix |
|---|---|---|
AccessDenied / 403 |
IAM policy too narrow | Ensure the policy above (at least s3:ListAllMyBuckets). |
| Returns 0 buckets but you know there are buckets | You’re using keys from another AWS account | Switch to keys for the correct account/role. |
InvalidAccessKeyId or SignatureDoesNotMatch |
Keys pasted incorrectly / extra spaces | Re-paste keys carefully; make sure there are no hidden characters. |
| Corporate proxy in the way | HTTP(S) proxy intercepting | Use idOptional to pass proxy flags if needed (e.g., --proxy http://user:pass@host:port). |
RequestTimeout |
Slow/filtered network | Try again; optionally add --max-time 60 in idOptional. |
s3:ListAllMyBuckets and (optionally) s3:GetBucketLocation.nothing once things work to avoid verbose logs.s3:GetBucketLocation in the policy.