Skip to content

WolfgangMau/aws-profile-checker

Repository files navigation

aws-profile-checker

this little program checks all listed profiles which are located in $HOME/.aws/config against aws and proofs if they are valid configured. there is no really need for this kind of tool, but I just needed an reason for my first golang-coding

Build Status

I provides following copmmandline-options:

  • -h / -help showns the help
  • -l list all profiles wthiout checking them profiles, which needs MFA are colored in red, others are not colored
  • -n checks only this named profile
  • -mfa checks all profiles which need MFA
  • -nomfa checks all profiles which don't need MFA
  • -a checks all profiles
  • -e edit a existing profile
  • -c helps you to create a new named profile

dependencies

build

  • go build

Usage examples:

show help

aws-profile-checker -h
Usage of aws-profile-checker:

  -a	check all profiles
  -c	create  a new profile
  -l	only list the profiles
  -mfa
    	check only profiles that require MFA
  -n string
    	check one named profile
  -nomfa
    	check only profiles that don´t require MFA

list all profiles

aws-profile-checker -l
using config-file: /Users/Moe/.aws/config

Bart
Homer
Lisa
Maggie
Marge

check all profiles

aws-profile-checker -a
using config-file: /Users/Moe/.aws/config

1	Bart                     OK
2	Homer                    OK
3	Lisa                     OK
4	Maggie                   OK
5	Marge                    OK

check a named profile

aws-profile-checker -n Bart
using config-file: /Users/Moe/.aws/config

1	Bart                     OK

edit profile

aws-profile-checker -e

bulk add profiles

aws organizations list-accounts | aws-profile-checker
OR
cat sample_accounts.json | aws-profile-checker

About

just a script to check the config against aws

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages