AWS Management — Assuming role in AWS CLI with MFA authentication.

  1. We use normal profile to get session Token, with MFA authentication.
  2. We create temp profile for MFA authenticated session.
  3. We authenticated and assume desired role with that profile and add role profile to .aws/credentials file
  4. Then, we can start using it in any aws cli command with --profile argument
  5. What information we need:
  1. Now we are getting MFA authentication session object, and parsing it to extract:
  2. aws_access_key_id
  3. aws_secret_access_key
  4. aws_session_token

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Sketch + Git: Having a Tea Party With Engineering-Driven Team

Beginner Software Developer.exe Guide

Player Damage System in Unity

🐳 Docker Containers | What happens under the hood? (For Beginners)

Pocoland Airdrop Round 1

A new approach for Stateful stream processing

How to Develop a Successful Enterprise App?

beautiful views and graphics

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
John Gakhokidze

John Gakhokidze

More from Medium

Amazon S3: Features and Storage Classes

Access AWS Resources using IAM Role through AWS SDK of NodeJS

Understanding AWS S3 | Part 1 Terminology and Concepts

AWS CloudFront — Overview