May-19-2024, 11:50 AM
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 ?
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)