feature-request: support mfa_serial (consistency with aws cli)
See original GitHub issueif a profile in ~/.aws/config
includes mfa_serial
option, then aws cli reads it and asks for MFA code:
Enter MFA code for arn:aws:iam::665544332211:mfa/myusername:
where as cdk simply errors out:
The security token included in the request is expired
for the time being, I use a hacky solution where i first use AWS CLI with a sample command like aws ec2 describe-availability-zones --profile my-profile
which asks me for MFA token and then upon authentication, creates a file ~/.aws/cli/cache/xxxx.json
from where I can extract the temp access key, secret and session token and set them as environment variables for terminal. then, AWS CDK utilises those values and works as expected.
Can mfa support please be added to cdk also please?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:46
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Authenticate access using MFA through the AWS CLI
How do I use an MFA token to authenticate access to my AWS resources with the AWS Command Line Interface (AWS CLI)? ...
Read more >create-feature — AWS CLI 1.27.37 Command Reference
Creates an Evidently feature that you want to launch or test. You can define up to five variations of a feature, and use...
Read more >Setting the AWS CLI output format - AWS Documentation
This topic describes the different output formats for the AWS Command Line Interface (AWS CLI). The AWS CLI supports the following output formats:....
Read more >AWS CLI retries - AWS Command Line Interface
These issues can occur on the server side or might fail due to rate limiting from the AWS service you're attempting to call....
Read more >get-item — AWS CLI 1.27.34 Command Reference
If there is no matching item, GetItem does not return any data and there will be no Item element in the response. GetItem...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 for this feature. This could be very useful to practice CDK in my organization.
Our org only allows for accounts with MFA enabled using IAM. The workaround is ugly and not very accessible unless you’re an advanced user… The CDK (IMO) makes cloudformation more accessible, which is kind of the opposite of this workaround 😄 Hopefully this gets prioritised soon!