question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feature-request: support mfa_serial (consistency with aws cli)

See original GitHub issue

if 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:closed
  • Created 5 years ago
  • Reactions:46
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

17reactions
solcyrcommented, Dec 5, 2018

+1 for this feature. This could be very useful to practice CDK in my organization.

10reactions
abbottdevcommented, Jun 7, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found