Python Forum
AWS Boto3 - objects function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AWS Boto3 - objects function
#1
Hi ,

I am using this code to display each key or file of AWS S3 bucket.

It is doing the job that I want. However, When I look at AWS Boto3 package documentation, I could not locate "objects" function in Boto3 package. Is the objects function part of Boto3 or any other package or module ?

import boto3

#Then use the session to get the resource
s3 = session.resource('s3')

my_bucket = s3.Bucket('stackvidhya')

for my_bucket_object in my_bucket.objects.all():
    print(my_bucket_object.key)
buran write May-19-2024, 07:43 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  boto3 - Error - TypeError: string indices must be integers kpatil 7 1,621 Jun-09-2023, 06:56 PM
Last Post: kpatil
  boto3 Help Needed gw1500se 0 853 Jul-30-2022, 04:06 PM
Last Post: gw1500se
  function that run once for all objects mr_byte31 10 5,650 Oct-16-2021, 11:33 AM
Last Post: Gribouillis
  boto3 Amazon SQS raghuvamsi59 1 1,616 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