configure-aws-credentials
configure-aws-credentials copied to clipboard
Improve error messaging
Currently any number of failures result in Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers
which isn't terribly helpful. We should better surface error messages for:
- the workflow not having the correct permissions
- IAM refusing to grant credentials for a token
- others?
Richard, is there any form of debug logging currently? I've got this working in one repository, but it fails in another repository using the same OIDC provider and an identical role. As you mentioned I just get Could not load credentials from any providers
which doesn't help much.
Did you update the Role's condition on the trust policy to allow the second repository as well?
I created a whole new role for each repository. The only thing funky about this repo I can think of is that I moved it from my personal org to my company org, but I've tried both names and even removed the Condition entirely. I've probably done something dumb, but there's just no path to debug right now.
I see the error fairly frequently in one of my repos - it's intermittent and rerunning a workflow will generally work / not produce this error. However, having this pop up as often as it does slows down my CI/CD process. I'd love more info on what's causing it and why it only happens sometimes, but not consistenly.
same here, got Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers
and would really like to know where to start looking.
Any chance the error messages / logs are improved?
We should absolutely improve error messaging. I'll try to update this thread with the errors I and others come across that are unclear
Any updates here?
I have a job on a self hosted runner, on one container it runs smoothly, on another I'm getting: Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers
If the error message would be more specific, I could tell where the problem resides.
The error messaging will be improved upon in v3, however I can't yet give a date for when that will be available.
@astropanic feel free to submit a new issue or discussion with further details including your workflow files
For me, it was because I missed adding the id-token
permission, which is in the README, I just missed it: https://github.com/aws-actions/configure-aws-credentials/blob/746d33e7c1cc7b6e40a836b0f2ef033136aa6b2a/README.md#L73-L76
Leaving this note here for future travelers.
For me, every time it's because I forget to add the permissions token. :P It would be nice if the error message told you to check this.
Error messaging and our docs should be improved overall for this action in v3
. Please open any issues if you encounter any error messages that are unclear.
** Note ** Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.