Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

afpacket/aws-auth-helper-scripts

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-auth-helper-scripts

Scripts to help with Okta authentication to AWS

Depends on aws-cli and either okta-awscli or okta-aws-cli-assume-role.

aws-setenv reads from ~/.aws/credentials and sets the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN environment variables accordingly.

Instructions

Copy scripts to /usr/local/bin (or run setup.sh) and add these functions to your bashrc:

function okta-login { /usr/local/bin/okta-login.sh "$1"; } # not needed for okta-awscli
function aws-native-mfa-login { eval "$(/usr/local/bin/aws-native-mfa-login.sh "$1" "$2")"; }
function aws-setenv { eval "$(/usr/local/bin/aws-setenv.sh "$1")"; }

These scripts by default leverage the profile name of okta but you can set different profile names simply by including the desired name as an argument (i.e. aws-setenv dev).

Note: if using okta-awscli, you need to supply the --profile with you command (i.e. okta-awscli --okta-profile dev --profile dev) so that the credentials get put into ~/.aws/credentials.

About

Scripts to help with authentication to AWS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.