---
title: "Discussion on \"Generate MFA authenticated credentials for AWS CLI (and a script to automate this task)\" | Hashnode"
description: "Discussion on \"Generate MFA authenticated credentials for AWS CLI (and a script to automate this task)\". You'll learn how to generate MFA authenticated temporary credentials to pass the MFA check while using AWS CLI to access the AWS resources."
url: "https://hashnode.com/posts/generate-mfa-authenticated-credentials-for-aws-cli/612ca1732858872661b9d2bf"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Generate MFA authenticated credentials for AWS CLI (and a script to automate this task)](https://blog.gurjot.dev/generate-mfa-authenticated-credentials-for-aws-cli?utm_source=hashnode&utm_medium=feed)

You'll learn how to generate MFA authenticated temporary credentials to pass the MFA check while using AWS CLI to access the AWS resources.

Aug 30, 2021 · 4 min read · blog.gurjot.dev  
Read the article

-   [#aws](https://hashnode.com/tag/aws)
-   [#security](https://hashnode.com/tag/security)
-   [#command-line](https://hashnode.com/tag/command-line)
-   [#cloud](https://hashnode.com/tag/cloud)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[Gurjot Singh](https://hashnode.com/@gurjotsingh4398)

@gurjotsingh4398 · India

  
[View profile](https://hashnode.com/@gurjotsingh4398)

Cloud Engineer @AWS | Web Developer | Writer | Creator

I am a Cloud Engineer working at AWS to help customers maintain security in the cloud. Love to play with JavaScript in my free time and write about my learnings to make your tech journey smoother and productive!

## Responses 1

Markdown supported · ⌘↵ to post

[Andrea Cavagna](https://hashnode.com/@acava)

[Aug 31, 2021](https://hashnode.com/posts/generate-mfa-authenticated-credentials-for-aws-cli/612ca1732858872661b9d2bf/comment/612de10b0e60b801c64c926f)

Check out Leapp: It manages MFA and automatically rotates credentials, also manages Cross-account roles from MFA automatically rotated:

[https://github.com/Noovolari/leapp](https://github.com/Noovolari/leapp)
