-
Notifications
You must be signed in to change notification settings - Fork 498
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
Fix aws default credentials #1963
Conversation
@@ -40,10 +40,6 @@ func New(s3Conf *config.S3Config, timeout time.Duration, options ...func(*aws.Co | |||
return nil, errors.E(op, err) | |||
} | |||
|
|||
// Remove anonymous credentials from the default config so that | |||
// session.NewSession can auto-resolve credentials from role, profile, env etc. | |||
awsConfig.Credentials = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this is interesting. I wonder if roles, profiles, and ENV settings will break now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I think I understand the problem. Line 38 should be using this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, nevermind - this clearly says that roles, profiles, env etc should be covered by LoadDefaultConfig
@@ -40,10 +40,6 @@ func New(s3Conf *config.S3Config, timeout time.Duration, options ...func(*aws.Co | |||
return nil, errors.E(op, err) | |||
} | |||
|
|||
// Remove anonymous credentials from the default config so that | |||
// session.NewSession can auto-resolve credentials from role, profile, env etc. | |||
awsConfig.Credentials = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, nevermind - this clearly says that roles, profiles, env etc should be covered by LoadDefaultConfig
@yongzhang have you tested the build of this branch in your own infrastructure to verify it works? |
yea I tested and confirmed it works, but actually I didn't get a chance to test this part. |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [gomods/athens](https://github.com/gomods/athens) | patch | `v0.14.0` -> `v0.14.1` | --- ### Release Notes <details> <summary>gomods/athens (gomods/athens)</summary> ### [`v0.14.1`](https://github.com/gomods/athens/releases/tag/v0.14.1) [Compare Source](https://github.com/gomods/athens/compare/v0.14.0...v0.14.1) #### What's Changed - CI dependency updates in [https://github.com/gomods/athens/pull/1962](https://github.com/gomods/athens/pull/1962) - Fix for AWS default credentials by [@​yongzhang](https://github.com/yongzhang) in [https://github.com/gomods/athens/pull/1963](https://github.com/gomods/athens/pull/1963) - Fix for E2E test runs by [@​joeymhills](https://github.com/joeymhills) in [https://github.com/gomods/athens/pull/1966](https://github.com/gomods/athens/pull/1966) - Feature gcp/saver: Only return errors.KindAlreadyExists if all three exist by [@​dwbuiten](https://github.com/dwbuiten) in [https://github.com/gomods/athens/pull/1957](https://github.com/gomods/athens/pull/1957) - Fix to set correct content type and send only once by [@​matt0x6F](https://github.com/matt0x6F) in [https://github.com/gomods/athens/pull/1965](https://github.com/gomods/athens/pull/1965) #### New Contributors - [@​yongzhang](https://github.com/yongzhang) made their first contribution in [https://github.com/gomods/athens/pull/1963](https://github.com/gomods/athens/pull/1963) - [@​joeymhills](https://github.com/joeymhills) made their first contribution in [https://github.com/gomods/athens/pull/1966](https://github.com/gomods/athens/pull/1966) - [@​dwbuiten](https://github.com/dwbuiten) made their first contribution in [https://github.com/gomods/athens/pull/1957](https://github.com/gomods/athens/pull/1957) **Full Changelog**: gomods/athens@v0.14.0...v0.14.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/gomods/athens-charts). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
What is the problem I am trying to address?
Unable to access s3 with default config in v0.14.0, but v0.13.x works very well.
How is the fix applied?
Mention briefly how you have applied the fix.
What GitHub issue(s) does this PR fix or close?
Fixes #1961