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

Regions other than us-east-1 are broken #112

Closed
wpuckering opened this issue Oct 31, 2018 · 11 comments
Closed

Regions other than us-east-1 are broken #112

wpuckering opened this issue Oct 31, 2018 · 11 comments

Comments

@wpuckering
Copy link

It seems like setting a different region other than us-east-1 does not work properly. I have a bucket in ca-central-1 which I can upload and delete files from just fine, but I can't edit a text file once uploaded to the bucket. I get the following error saying that the region is invalid:

image

A snippet of my configuration file showing that I have set my region to ca-central-1 is below:

image

Seems like this piece of code is the culprit:

image

@mickael-kerjean
Copy link
Owner

Thanks for the report!
I'll try to fix somewhere next week.

@mickael-kerjean
Copy link
Owner

mickael-kerjean commented Nov 15, 2018

I wasn't able to replicate your error with a bucket in Canada. I'm not sure where did you get the full endpoint url from, can you try this:

    "connections": [
        {
            "type": "s3",
            "label": "S3",
            "access_key_id": "xxxxxxx",
            "secret_access_key": "xxxxxxx",
            "region": "ca-central-1",
            "advanced": false,
            "encryption_key": "",
            "endpoint": "",
            "path": "/your_canadian_bucket_name/"
        }
    ]

@mickael-kerjean
Copy link
Owner

Looks like problem solve in here. I'm closing but feel free to comment back and I'll reopen

@stefanoCaroli
Copy link

Hi, I'm trying to connect to a bucket in Europe (region: eu-west-1) but I am still experiencing the same error code:

Screenshot 2019-10-15 at 13 16 38

Am I missing something in the configuration or is it just the same bug mentioned above?

@gianlucapisati
Copy link

gianlucapisati commented Oct 16, 2019

Hi @mickael-kerjean same problem here, buckets different than us-east-1 seems not to be working

my connection string is like this:

"connections": [
        {
            "type": "s3",
            "label": "S3",
            "access_key_id": "xxxxxxx",
            "secret_access_key": "xxxxxxx",
            "region": "eu-west-1",
            "advanced": false,
            "encryption_key": "",
            "endpoint": "",
            "path": ""
        }
    ]

if i don't specify any path it loads the initial list of buckets, but then, when I open one bucket I receive the same error of @stefanoCaroli and @wpuckering

@mickael-kerjean
Copy link
Owner

Can someone send me a testing account from which I can try?

@mickael-kerjean
Copy link
Owner

I haven't received anything at all. I'm closing until there's enough information to act upon.

@TetrisBlack
Copy link

TetrisBlack commented Feb 1, 2022

Hello,
I have the same issue with the region s3 bucket config. I wanted to test my assumption, but I couldn't get the backend to build on my machine, but could attach a debugger. Nevertheless, I think the problem lies in this line:

res, err := s.client.GetBucketLocation(&s3.GetBucketLocationInput{

It always results in an error. And overwriting the region.
Something similar was discussed in here -> aws/aws-sdk-go#720.

EDIT:
If you add "s3:GetBucketLocation" to your allowed actions. It works as well. Maybe add a list of minimum needed S3 Permissions?

@jonasjancarik
Copy link

EDIT: If you add "s3:GetBucketLocation" to your allowed actions. It works as well. Maybe add a list of minimum needed S3 Permissions?

I second that, adding "s3:GetBucketLocation" to allowed actions also fixed the issue for us.

@mickael-kerjean
Copy link
Owner

I still need a testing account to test this out, can you send one? email is in my profile

@jonasjancarik
Copy link

Do you mean an access key/secret key? I can't use our corporate one (for obvious reasons) but I'll try to sign up for a new AWS account at some point soon to teset this.

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

6 participants