Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (5.6k points)

I'm working with AWS CLI, so How can type in the MFA code in that?

I have enabled the MFA device under my username

aws iam list-mfa-devices --user-name X

which returns


"MFADevices": [


        "UserName": "X", 

        "SerialNumber": "arn:aws:iam::+++:mfa/X", 

        "EnableDate": "2016-01-13T23:15:43Z"




1 Answer

0 votes
by (12.4k points)
edited by

Here, you can call 

aws sts get-session-token --serial-number <serial> --token-code <code>

This will provide you with a temporary security token. To know more about using the temporary tokens you can read here.

Looking forward to know more about AWS, then come and join aws certification training.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
asked Jul 2, 2019 in AWS by Amyra (12.9k points)

Browse Categories