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

Amazon S3 region detection seems to be broken #22

Closed
akozhemiakin opened this issue Oct 24, 2019 · 0 comments
Closed

Amazon S3 region detection seems to be broken #22

akozhemiakin opened this issue Oct 24, 2019 · 0 comments

Comments

@akozhemiakin
Copy link

akozhemiakin commented Oct 24, 2019

First of all, my S3 region is not default (is not us-east-1).

I tried running command similar to this one:

app-builder.exe publish-s3 --bucket bucket-name --key test.txt --file "D:\test.txt"

and it fails with

AccessDenied: Access Denied status code: 403, request id: 0A932DFCA22D0A12, host id: sLVlhIFpvh7QQqaiPsjQeV9/Jli9sIk8c44X89eStgAkvXArYSsAKLLblZDnX8m8lSaZ9k/nm/s=
github.com/develar/app-builder/pkg/publisher.getBucketRegion       
/Volumes/data/Documents/app-builder/pkg/publisher/s3.go:99

However it runs ok when I explicitly specify correct --region option.

Also, to check if my creds are ok (btw I have permission s3:GetBucketLocation) I created sample script using aws nodejs sdk and it succesfully recieved region info.

I suspect, that it may be related to this part:

awsSession, err := session.NewSession(awsConfig, &aws.Config{
    // any region required
    Region:     aws.String("us-east-1"), // <---- is it really required?
    HTTPClient: httpClient,
})

... but I`m not sure.

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

Successfully merging a pull request may close this issue.

1 participant