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

S3 context implementation has issues with non default regions and shared credentials #285

Closed
daniel-harrison opened this issue Aug 13, 2018 · 3 comments
Labels
kind/bug Something isn't working

Comments

@daniel-harrison
Copy link
Contributor

Hi, I was attempting to use the s3 context and ran into some issues using ap-southeast-2 and creating a k8s job with mounted credentials .aws/config and .asw/credentials. Errors reported around authentication and region permissions otherwise.

I think this line in s3.go

downloader := s3manager.NewDownloader(session.New())

Should be something like

// enable shared config
sess, err := session.NewSessionWithOptions(session.Options{
	SharedConfigState: session.SharedConfigEnable,
})
if err != nil {
	return s.context, err
}
downloader := s3manager.NewDownloader(sess)

That at least worked for me, but interested if anyone else has had issues.

@priyawadhwa priyawadhwa added the kind/bug Something isn't working label Aug 13, 2018
@priyawadhwa
Copy link
Collaborator

Hey @daniel-harrison , thanks for pointing this bug out. Would you be interested in opening a PR with these changes?

@daniel-harrison
Copy link
Contributor Author

Yep no worries, not a go guy so let me know if it's not good practice.

@priyawadhwa
Copy link
Collaborator

Closing as this should be fixed in #321

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants