def get_website_endpoint(bucket_name):
# bucket names with .'s in them need to use the calling_format option,
# otherwise the connection will fail.
# See https://github.com/boto/boto/issues/2836
bucket = connect_s3(
calling_format=OrdinaryCallingFormat()
).get_bucket(bucket_name, validate=False)
return bucket.get_website_endpoint()
评论列表
文章目录