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
It comes from the new CognitoIdentityClient({region: REGION}) line.
The stack trace:
TypeError: Object(...) is not a function
at defaultProvider (...)
at Object.credentialDefaultProvider (...)
at resolveAwsAuthConfig (...)
at new CognitoIdentityClient (...)
Your environment
macOS Catalina v10.15.7, MacBook Pro (16-inch, 2019)
Running this inside the WebStorm IDE from JetBrains.
I cannot reproduce the issue, can you point out which line in source code is throwing the error? It'll be the helpful for us if you can create a reproduction repo so we can reproduce the issue from clean slate.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Describe the bug
I am trying to create an S3Client object in my NodeJS service that will use credentials from my Cognito Identity Pool. I've followed the tutorial here: https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-browser-credentials-cognito.html. However, when I run that code, I see
TypeError: Object(...) is not a function
.It comes from the
new CognitoIdentityClient({region: REGION})
line.The stack trace:
Your environment
macOS Catalina v10.15.7, MacBook Pro (16-inch, 2019)
Running this inside the WebStorm IDE from JetBrains.
SDK version number
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
Paste output of
npx envinfo --browsers
ornode -v
orreact-native -v
Steps to reproduce
Observed behavior
Trying to create an S3Client using the v3 tutorial results in a TypeError being thrown when the CognitoIdentityClient is created.
Expected behavior
No TypeError should be thrown. I should be able to create the S3Client with no issues.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: