You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With SDK v1, when testing our application on windows:
We first ran out company's credentials process, and store the credentials in ~/.aws/credentials
We then run our application with AWS_PROFILE environment variable set to the profile name in credentials file
DefaultAWSCredentialsProviderChain is able to find and use those credentials
With SDK v2's DefaultCredentialsProvider, I'm getting errors with little details. Using debug logs, I found the problem occurs in ProcessCredentialsProvider.
It appears ProcessCredentialsProvider finds the credential_process value in ~/.aws/config, then tries to fetch credentials by running that process. Under windows, it always runs this process under "cmd.exe". Unfortunately, my company's credential process ONLY runs under gitbash.exe. This throws an error and prevents my application from accessing AWS.
Workarounds I've found so far:
Set environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN before running
Hard code to use ProfileCredentialsProvider with profile file as ~/.aws/credentials when running locally.
Setting AWS_SHARED_CREDENTIALS_FILE value made no difference.
With default values, ProfileCredentialsProvider uses ProcessCredentialsProvider and we get the same error.
Hard code to use ProcessCredentialsProvider with command that uses gitbash when running locally.
These workarounds are far less than ideal.
Is there a better way to tell SDK to use the values in ~/.aws/credentials and ignore ~/.aws/config?
Is there a better way to tell the SDK to run the credential process in gitbash?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
With SDK v1, when testing our application on windows:
With SDK v2's DefaultCredentialsProvider, I'm getting errors with little details. Using debug logs, I found the problem occurs in ProcessCredentialsProvider.
It appears ProcessCredentialsProvider finds the credential_process value in ~/.aws/config, then tries to fetch credentials by running that process. Under windows, it always runs this process under "cmd.exe". Unfortunately, my company's credential process ONLY runs under gitbash.exe. This throws an error and prevents my application from accessing AWS.
Workarounds I've found so far:
Setting AWS_SHARED_CREDENTIALS_FILE value made no difference.
With default values, ProfileCredentialsProvider uses ProcessCredentialsProvider and we get the same error.
These workarounds are far less than ideal.
Beta Was this translation helpful? Give feedback.
All reactions