Created
December 13, 2025 13:25
-
-
Save gchait/5b4c8e9c9b8701170484aa6e3f47b6fa to your computer and use it in GitHub Desktop.
Set AWS profile given an account ID
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
| export AWS_PROFILE=$(grep -B20 "${ACCOUNT_ID}" ~/.aws/config | \ | |
| grep "^\[" | tail -1 | tr -d "[]" | awk '{print $NF}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment