Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(create_bucket): avoid S3 InvalidLocationConstraint error #82

Merged
merged 1 commit into from
Feb 23, 2017

Conversation

aboyett
Copy link
Contributor

@aboyett aboyett commented Feb 22, 2017

calling create_bucket(bucket_name, region="us-east-1") yields the
following error:

boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidLocationConstraint</Code>
<Message>The specified location-constraint is not valid</Message>
<LocationConstraint>us-east-1</LocationConstraint>...</Error>

based on the comments in boto/boto3#125 this commit omits the region
kwarg to the create_bucket() call when s3.region is set to "us-east-1"

@deis-admin
Copy link

Thanks for the contribution! Please ensure your commits follow our style guide. This code will be tested once a Deis maintainer reviews it.

calling create_bucket(bucket_name, region="us-east-1") yields the
following error:

boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidLocationConstraint</Code>
<Message>The specified location-constraint is not valid</Message>
<LocationConstraint>us-east-1</LocationConstraint>...</Error>

based on the comments in boto/boto3#125 this commit omits the region
kwarg to the create_bucket() call when `s3.region` is set to "us-east-1"
@aboyett
Copy link
Contributor Author

aboyett commented Feb 23, 2017

Whoops, I just updated the code to remove some cruft left-over after I cherry-picked this from deis/postgres#187

@bacongobbler bacongobbler merged commit 93f7910 into deis:master Feb 23, 2017
@aboyett aboyett deleted the fix-s3-us-east-1 branch February 24, 2017 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants