Skip to content

Bash script to facilitate logging in and assuming AWS roles.

Notifications You must be signed in to change notification settings

pedrocatalao/qlaws-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qlaws-cli

Bash script to facilitate logging in and assuming AWS roles.

  • Unlocks the aws-vault keychain without user intervention.
  • Generates TOTP token for 2FA and uses it automatically.
  • Also allows to stay in the same session for use within another script that requires changing accounts or roles.
  • It looks cool, too ;)

qlaws

If you want to use it within a script, you can do something like this:

#!/bin/bash
qlaws -x;loadauth
terraform apply
echo "servers are created..."
assume my-first-server-role
ansible-playbook myproject.yml -i my-first-server.host
echo "application is installed on my first server"
leave
assume my-second-server-role
ansible-playbook myproject.yml -i my-second-server.host
echo "application is installed on my second server"

It will login and assume different roles while staying on the main script without the need for user input.

About

Bash script to facilitate logging in and assuming AWS roles.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages