ProcessCredentialsProvider does not indicate why the process failed
Describe the feature
ProcessCredentialsProvider fails on non-zero exit code without providing any useful debugging info. The provider could capture the stderr into the exception message/description
Use Case
To load credentials from an external process using the credential_process attribute in aws config file.
Proposed Solution
Capture the stderr into the exception message/description thrown from ProcessCredentialsProvider
Other Information
No response
Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
AWS Java SDK version used
2,x
JDK version used
1.8
Operating System and version
Mac OS 12.3.1
Hi @Avinm thank you for reaching out.
Indeed we don't see a very helpful error message, just
java.lang.IllegalStateException: Command returned non-zero exit value: 127
We should improve the experience here. Marking as a feature request.
As it looks like you are using the Java SDK 2.x I'll transfer this to the aws/aws-sdk-java-v2 repo.
To anyone stumbling on this issue, I was getting this error because of a command not found.
In my case, I was running intellij via flatpak. The command I was using only existed in my host /usr/bin/.
Added in SDK version 2.18.20.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please 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.