aws-sdk-java-v2 icon indicating copy to clipboard operation
aws-sdk-java-v2 copied to clipboard

ProcessCredentialsProvider does not indicate why the process failed

Open Avinm opened this issue 3 years ago • 1 comments

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

Avinm avatar Aug 22 '22 19:08 Avinm

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.

debora-ito avatar Aug 24 '22 21:08 debora-ito

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/.

achaphiv avatar Sep 24 '22 08:09 achaphiv

Added in SDK version 2.18.20.

debora-ito avatar Nov 17 '22 21:11 debora-ito

⚠️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.

github-actions[bot] avatar Nov 17 '22 21:11 github-actions[bot]