‘S3’ object has no attribute ‘Bucket’ in pyhton
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is more than one way to interact with Boto3.
The high-level one using
resource()
and classes likeS3.Bucket
. And the low-level one usingboto3.client(...)
. You are kind of mixing these two.High-level example:
s3 = boto3.resource(<span>'s3'</span>) the_bucket = s3.Bucket(<span>'my_bucket'</span>)
Low-level example:
self.client = boto3.client(…)
self.client.create_bucket(…)