Created
December 7, 2022 22:29
-
-
Save tayopal/7aa9ca64ade4c80ec633f2a27d66e4ef to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#! /usr/bin/env python3 | |
import configparser | |
import os | |
aws_config_filepath = os.path.expanduser('~/.aws/config') | |
config = configparser.ConfigParser() | |
config.read(aws_config_filepath) | |
print(' '.join([x[8:] for x in config.sections() if x[8:] != os.environ.get('AWS_PROFILE')])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment