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,220 points
61 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,260 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,080 points
122 views
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,220 points
33 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,080 points
62 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
150 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

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

answered Sep 6, 2018 in AWS by bug_seeker
• 15,350 points
331 views
+3 votes
2 answers

How to download folder from AWS S3?

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

answered Sep 6, 2018 in Cloud Computing by eatcodesleeprepeat
• 4,670 points
4,002 views