-
Notifications
You must be signed in to change notification settings - Fork 461
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
Error: Could not load credentials from any providers - Caused by env var #962
Comments
Thanks for reaching out. In the README it notes:
Other comments such as this one go into more detail here. The documentation could potentially be further improved to describe the behavior. |
Thank you for the answer. In the README, this behaviour seems to only apply to self-hosted runners, since what you described is only on that section, but I'm glad to now know that this situation happened due to an attempt to authenticate via the SDK. Adding the SDK as an authentication option in the table of section https://github.com/aws-actions/configure-aws-credentials?tab=readme-ov-file#using-this-action might provide better visibility and transparency of this method. Thank you for your help, Tim |
We do call this out in the very first paragraph of the README, but we can still be a little more clear. |
Comments on closed issues are hard for our team to see. |
1 similar comment
Comments on closed issues are hard for our team to see. |
Describe the bug
When running the action, if there was an environment variable with the name
AWS_PROFILE
set, it would throw the error:By removing this env var, the actions runs successfully.
Expected Behavior
Action to run without a problem, no matter which env vars I set on my workflow.
Current Behavior
My including a env var named
AWS_PROFILE
, the action fails with the error:Reproduction Steps
The workflow below creates two jobs, one of them works and the other fails:
Possible Solution
The env var is referenced here:
configure-aws-credentials/dist/index.js
Lines 14636 to 14641 in 6e4af39
and here, only:
configure-aws-credentials/dist/cleanup/index.js
Lines 14048 to 14053 in 6e4af39
One possible fix could be to remove the following option
|| process.env[exports.ENV_PROFILE] ||
and turn that line into:Additional Information/Context
Is an env var defined at the job level used by all the lower level steps on a workflow? If yes, then it should be documented on this action to reserve these env var names, or overwrite them correctly, or choose a different method.
The text was updated successfully, but these errors were encountered: