Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS_PROFILE no longer works in v3 #2011

Closed
simov opened this issue Feb 9, 2021 · 2 comments · Fixed by #2221
Closed

AWS_PROFILE no longer works in v3 #2011

simov opened this issue Feb 9, 2021 · 2 comments · Fixed by #2221
Assignees
Labels
bug This issue is a bug. duplicate This issue is a duplicate.

Comments

@simov
Copy link

simov commented Feb 9, 2021

Describe the bug

Using AWS_PROFILE no longer works in aws-sdk v3 (might be related to this one #1193).

I understand that in v3 the STS module is no longer part of the core SDK, but even after including @aws-sdk/client-sts in my project, using AWS_PROFILE still throws the following error:

(node:2519) UnhandledPromiseRejectionWarning: Error: Profile the-profile requires a role to be assumed, but no role assumption callback was provided.
    at resolveProfileData (/the-project/node_modules/@aws-sdk/credential-provider-ini/dist/cjs/index.js:49:19)
    at /the-project/node_modules/@aws-sdk/credential-provider-ini/dist/cjs/index.js:29:59
    at async SignatureV4.credentialProvider (/the-project/node_modules/@aws-sdk/property-provider/dist/cjs/memoize.js:26:26)
    at async SignatureV4.signRequest (/the-project/node_modules/@aws-sdk/signature-v4/dist/cjs/SignatureV4.js:84:29)
    at async /the-project/node_modules/@aws-sdk/middleware-signing/dist/cjs/middleware.js:14:22
    at async StandardRetryStrategy.retry (/the-project/node_modules/@aws-sdk/middleware-retry/dist/cjs/defaultStrategy.js:56:46)
    at async /the-project/node_modules/@aws-sdk/middleware-logger/dist/cjs/loggerMiddleware.js:6:22

Nothing else changed on my end besides updating the require statements in my project to use the v3 ones and remove .promise() on all API calls.

Your environment

SDK version number

"@aws-sdk/client-kms": "^3.4.1",
"@aws-sdk/client-sts": "^3.4.1"

Is the issue in the browser/Node.js/ReactNative?

Node.js CLI script using AWS_PROFILE to assume a role

Details of the browser/Node.js/ReactNative version

Paste output of npx envinfo --browsers or node -v or react-native -v

v10.23.1
v12.20.1

Steps to reproduce

Please share code or minimal repo, and steps to reproduce the behavior.

You can probably have an empty file and it's still going to throw the above error because that happens before executing your actual code. I can share an example if needed.

Observed behavior

A clear and concise description of what happens.

The above error message.

Expected behavior

A clear and concise description of what you were expecting to happen.

The SDK should assume the role provided using AWS_PROFILE

@simov simov added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 9, 2021
@AllanZhengYP AllanZhengYP added the duplicate This issue is a duplicate. label Mar 8, 2021
@AllanZhengYP
Copy link
Contributor

Hi @simov This is indeed duplicated with #1193. I will label this issue duplicate and I will post the latest progress on the other ticket. Please feel free to provide more comment on that issue too.

@AllanZhengYP AllanZhengYP self-assigned this Mar 8, 2021
@trivikr trivikr removed the needs-triage This issue or PR still needs to be triaged. label Mar 18, 2021
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. duplicate This issue is a duplicate.
Projects
None yet
3 participants