Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

584
Views
boto3: An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied?

I get this error in terminal when I try to list all the buckets using boto3: An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied.

Here's the code:

for bucket in s3.buckets.all():
    print(bucket.name)

I found a stack overflow question (Why is my terminal returning this s3 error?) and below is the proposed solution. I'm very unfamiliar with AWS so I need a bit of guidance.

Where can I find the dictionary inside like the one below inside the AWS console?

{
"Sid": "AllowListingOfAllBuckets",
"Effect": "Allow",
"Action": [
    "s3:ListAllMyBuckets"
],
"Resource": [
    "arn:aws:s3:::*"
]
}
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

you may add the following to the Actions array in the policy: s3:ListBucket

{
    "Sid": "AllowListingOfAllBuckets",
    "Effect": "Allow",
    "Action": [
       "s3:ListAllMyBuckets",
       "s3:ListBuckets",
    ],
    "Resource": [
       "arn:aws:s3:::*"
    ]
}

You may need to update the Resource: "Resource": "arn:aws:s3:::mywebsite.media/*"

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!