S3 context implementation has issues with non default regions and shared credentials
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.
Hey @daniel-harrison , thanks for pointing this bug out. Would you be interested in opening a PR with these changes?
Yep no worries, not a go guy so let me know if it's not good practice.
Closing as this should be fixed in #321