What is MFA and how to use it with AWS CLI

0 votes

I have an MFA device enabled already with a username

aws iam list-mfa-devices --user-name X
How can I get the temporary security token for it?
Jul 19, 2018 in Cloud Computing by code_ninja
• 6,290 points
389 views

1 answer to this question.

0 votes

To get the temporary session token use the following command:

aws sts get-session-token --token-code <value>

To use these security credentials with AWS CLI, follow the commands:

aws sts assume-role --role-arn arn:aws:iam::123456789012:role/role-name --role-session-name "RoleSession1" --profile IAM-user-name > assume-role-output.txt

Keep Learning :)

answered Jul 19, 2018 by Gopalan
• 1,360 points

Related Questions In Cloud Computing

0 votes
1 answer

AWS: What is SQS? How to use Amazon SQS?

Amazon Simple Queue service is a message ...READ MORE

answered Jul 11, 2018 in Cloud Computing by brat_1
• 7,200 points
581 views
+2 votes
1 answer
0 votes
1 answer

Is it possible to use VPC to have access between two AWS Regions

Good question this. Currently this feature is ...READ MORE

answered Apr 18, 2018 in Cloud Computing by code_ninja
• 6,290 points
236 views
0 votes
1 answer

AWS: What is in Sagemaker and what does it do?

Amazon SageMaker is a fully-managed platform that ...READ MORE

answered Aug 17, 2018 in Cloud Computing by brat_1
• 7,200 points
562 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,874 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

The awslogs works without using ECS. you need to configure ...READ MORE

answered Sep 7, 2018 in AWS by bug_seeker
• 15,530 points
1,232 views
+7 votes
3 answers

How to download folder from AWS S3?

To Download using AWS S3 CLI : aws ...READ MORE

answered Sep 7, 2018 in Cloud Computing by eatcodesleeprepeat
• 4,710 points
169,185 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP