Thanks to visit codestin.com
Credit goes to github.com

Skip to content

eldad/aws-auth

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

aws-auth

CI CD

Authenticate to AWS with MFA πŸ”

Installation

macOS

64-bit

curl -OL https://github.com/jhandguy/aws-auth/releases/download/v0.1.0/x86_64-apple-darwin.gz && tar xzvf x86_64-apple-darwin.gz

ARM64

curl -OL https://github.com/jhandguy/aws-auth/releases/download/v0.1.0/aarch64-apple-darwin.gz && tar xzvf aarch64-apple-darwin.gz

Linux

32-bit

curl -OL https://github.com/jhandguy/aws-auth/releases/download/v0.1.0/i686-unknown-linux-gnu.gz && tar xzvf i686-unknown-linux-gnu.gz

64-bit

curl -OL https://github.com/jhandguy/aws-auth/releases/download/v0.1.0/x86_64-unknown-linux-gnu.gz && tar xzvf x86_64-unknown-linux-gnu.gz

ARM64

curl -OL https://github.com/jhandguy/aws-auth/releases/download/v0.1.0/aarch64-unknown-linux-gnu.gz && tar xzvf aarch64-unknown-linux-gnu.gz

Usage

➜ aws-auth -h

aws-auth
Authenticate to AWS with MFA πŸ”

USAGE:
    aws-auth [OPTIONS] --code <CODE> <HOME>

ARGS:
    <HOME>    Home directory containing the AWS hidden folder [env: HOME=/Users/JohnDoe]

OPTIONS:
    -c, --code <CODE>            MFA code
    -d, --duration <DURATION>    Session duration in seconds [default: 3600]
    -h, --help                   Print help information
    -p, --profile <PROFILE>      Name of the AWS profile [default: default]
    -r, --region <REGION>        Name of the AWS region [default: eu-west-1]
    -s, --suffix <SUFFIX>        Suffix of the original AWS profile [default: noauth]

Create unauthorized credentials

Add in ~/.aws/credentials:

[<profile_name>-noauth]
aws_access_key_id = <aws_access_key_id>
aws_secret_access_key = <aws_secret_access_key>

Generate authorized credentials

Run in terminal:

aws-auth -p <profile_name> -c <mfa_code>

Output in ~/.aws/credentials:

[<profile_name>]
aws_access_key_id = <aws_access_key_id>
aws_secret_access_key = <aws_secret_access_key>
aws_session_token = <aws_session_token>

About

Authenticate to AWS with MFA πŸ”

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%