Skip to content

Getting the error CredentialsProviderError: Could not load credentials from any providers #4956

Discussion options

You must be logged in to vote

Hi @ANANDAJYOTIBASU, sorry to hear about your issues. The issue here seems to be that you are mixing SDKs. I see you are using both SDKs, v2 and v3, and you are loading credentials for v2 both using v3 to do the call. So, I recommend you to use just one SDK since this could cause confusion in your code.
Here is a quick example that could work for you, but using V3 SDK:

  • Please install @aws-sdk/credential-provider-ini by running npm install @aws-sdk/credential-provider-ini
import { SecretsManagerClient, GetSecretValueCommand } from "@aws-sdk/client-secrets-manager";
import { fromIni } from "@aws-sdk/credential-provider-ini";
import { createRequire } from 'module';

const require = createR…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@fruitschanghoon
Comment options

Answer selected by yenfryherrerafeliz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
4 participants