Skip to content

Commit

Permalink
Merge pull request #82 from aboyett/fix-s3-us-east-1
Browse files Browse the repository at this point in the history
fix(create_bucket): avoid S3 InvalidLocationConstraint error
  • Loading branch information
Matthew Fisher authored Feb 23, 2017
2 parents 1ef4525 + a885078 commit 93f7910
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rootfs/bin/create-bucket
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ if os.getenv('REGISTRY_STORAGE') == "s3" and os.getenv('REGISTRY_STORAGE_S3_BACK
conn = boto.s3.connect_to_region(region)

if not bucket_exists(conn, bucket_name):
conn.create_bucket(bucket_name, location=region)
if region == "us-east-1":
# use "US Standard" region. workaround for https://github.com/boto/boto3/issues/125
conn.create_bucket(bucket_name)
else:
conn.create_bucket(bucket_name, location=region)

elif os.getenv('REGISTRY_STORAGE') == "gcs":
scopes = ['https://www.googleapis.com/auth/devstorage.full_control']
Expand Down

0 comments on commit 93f7910

Please sign in to comment.