Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
boto3 Help Needed
#1
I'm just getting started with boto3 and AWS. I found this article and tried the sample code. I don't know if the sample code is wrong or if I need to be looking at something else. The bottom line is that the 'for' loop outputs nothing and I do not get any errors. Apparently 's3.buckets.all()' returns nothing. Is there a better, more accurate tutorial for getting started with boto3? TIA.

import boto3

s3 = boto3.resource('s3')

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  boto3 - Error - TypeError: string indices must be integers kpatil 7 1,294 Jun-09-2023, 06:56 PM
Last Post: kpatil
  boto3 Amazon SQS raghuvamsi59 1 1,555 Oct-01-2019, 04:32 AM
Last Post: raghuvamsi59

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020