I am new with this stuff, I want to get the location of s3 bucket but I still have this error "NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials" even I am using access key and secret key ? code is like this..
from boto3.session import Session
import boto
ACCESS_KEY_ID = '*****'
SECRET_KEY = '*****'
session = Session(aws_access_key_id = ACCESS_KEY_ID, aws_secret_access_key = SECRET_KEY)
s3 = session.resource('s3')
bucket = 's3://****'
my_bucket = s3.Bucket(bucket)
**conn = boto.connect_s3()
bucket = conn.get_bucket('*****')
bucket_location = my_bucket.get_location()
if bucket_location:
conn = boto.s3.connect_to_region(bucket_location)
bucket = conn.get_bucket('*****')**
You can just use get_bucket_location: