-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
SDK doesn't work with roles requiring MFA #1543
Comments
Just a very naive and temporary change to support for MFA, based on the code snippet presented in the feature request for MFA support of the aws-sdk-js (aws/aws-sdk-js#1543)
This is also a problem for our team. |
FWIW my snippet does NOT work with 1.14.10 (known working version is 1.11.190 - that's the version bump in homebrew which I currently use) because aws-cli decided to camouflage the filenames storing the temporary credentials in An updated version of my hack is available at https://gist.github.com/andreineculau/a186c2181a3099a422abc293c8e79fef |
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. |
Used SDK version: 2.60.0
Node.js version: v6.9.5
We have a role like one below defined in our account. We're working on to get MFA in use with both aws cli and with the node.js SDK.
And the ~/.aws/config:
When using aws-cli, it prompts properly for the MFA code and caches the temporary credentials under ~/.aws/cli/cache/. The node.js SDK is not sharing this functionality at all and seems like the support for MFA is completely missing.
This issue was discussed already in #993, and @andreineculau presented a potential (though ugly) workaround for it. The original issue was closed in #1391, but the problem presented with MFA tokens usage still remained. For the ease of readers, I will just quickly post the slightly edited version of it below, which seem to work with latest tagged version of SDK:
The workaround is utilizing the temporary credentials cached by aws cli which seems like an adequeate option for us, but I'd be happy to see some support for the MFA built in the SDK itself
The text was updated successfully, but these errors were encountered: