Created
January 3, 2020 08:43
-
-
Save mims92/ad548e5eeb2d24f7297b5e31bcef2de9 to your computer and use it in GitHub Desktop.
AWS - Bash - List all accounts id and name of the organization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#chmod +x /usr/bin/awsaccounts | |
#Usage: awsaccounts | |
aws organizations list-accounts --profile <profile name> | jq -r -e '["ID","", "NAME"], (.Accounts[] | [.Id, .Name] ) | @tsv' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment