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)
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.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
