Skip to content

Commit

Permalink
Fix default region for creating buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
koenbok committed Aug 27, 2015
1 parent 73b89bc commit 55e49bb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cactus/deployment/s3/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,17 @@ def create_bucket(self):
:returns: The newly created bucket
"""
try:

# When creating a bucket, the region cannot be "us-east-1" but needs
# to be an empty string, so we do that for now.
# https://github.com/boto/boto3/issues/125#issuecomment-109408790
if self._get_bucket_region() == "us-east-1":
region = ""
else:
region = self._get_bucket_region()

bucket = self.get_connection().create_bucket(self.bucket_name,
policy='public-read', location=self._get_bucket_region()
policy='public-read', location=region
)
except S3CreateError:
logger.info(
Expand Down

0 comments on commit 55e49bb

Please sign in to comment.