It seems that you need to use an empty string instead of the actual "us-east-1" to specify that location.
Im proposing to do this:
def create_bucket(self):
"""
:returns: The newly created bucket
"""
# S3 does not accept "us-east-1" must use "" instead
location = self._get_bucket_region()
if location == "us-east-1":
location = ""
try:
bucket = self.get_connection().create_bucket(self.bucket_name,
policy='public-read', location=location
)
except S3CreateError:
logger.info(
'Bucket with name %s already is used by someone else, '
'please try again with another name', self.bucket_name)
return #TODO: These should be exceptions
# Configure S3 to use the index.html and error.html files for indexes and 404/500s.
bucket.configure_website(self._index_page, self._error_page)
return bucket
Boto will give an error when tryng to create a bucket on region us-east-1 because this issue https://github.com/boto/boto3/issues/125
It seems that you need to use an empty string instead of the actual "us-east-1" to specify that location.
Im proposing to do this:
All test pass