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

Cannot create S3 bucket in us-east-1 region #104

Open
mumumumu opened this issue May 14, 2022 · 3 comments
Open

Cannot create S3 bucket in us-east-1 region #104

mumumumu opened this issue May 14, 2022 · 3 comments

Comments

@mumumumu
Copy link

mumumumu commented May 14, 2022

I've noticed I'm not able to initialize an S3 bucket in the us-east-1 region.

My replibyte.yaml:

datastore:
  aws:
    bucket: $S3_BUCKET
    region: $S3_REGION
    access_key_id: $S3_ACCESS_KEY_ID
    secret_access_key: $S3_SECRET_ACCESS_KEY

Running replibyte -c replibyte.yaml dump list with S3_BUCKET=us-east-1 results in this error:

[2022-05-14T03:13:11Z ERROR replibyte::datastore::s3] Error { code: "InvalidLocationConstraint", message: "The specified location-constraint is not valid", request_id: "...", s3_extended_request_id: "..." }
failed to create bucket 'replibyte'

But the command works fine with S3_BUCKET=us-east-2 and creates the bucket as expected.

I've attempted a workaround (mumumumu@c6eff63), and it works, but I'm not sure if there's a better way to handle this (I'm not really a rust dev 😅).

Found this in the AWS docs:

If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region (us-east-1)

It seems like you must not specify a region in order to create a bucket in us-east-1, at least with the Rust SDK.

@evoxmusic
Copy link
Contributor

Indeed, it's a strange issue. @benny-n @fabriceclementz did you experience something similar? 🤔

@benny-n
Copy link
Contributor

benny-n commented May 15, 2022

@evoxmusic
Since I don't have an available AWS account, I don't think I can reproduce this error 😕

@incorvia
Copy link

incorvia commented Feb 4, 2023

In the commands the OP is using they are using: S3_BUCKET=us-east-1 which is the name of a region but they are specifying it as the bucket name, shouldn't they be using S3_REGION=us-east-1 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants