Created
January 25, 2023 16:22
-
-
Save aortiz49/1bf4a08c0954a894b1ec93466d2a9126 to your computer and use it in GitHub Desktop.
Script to add AWS profiles for CLI
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/zsh | |
# set up aws staging profile | |
aws configure set aws_access_key_id --profile aortiz_staging $AWS_ACCESS_KEY_ID_STAGING | |
aws configure set aws_secret_access_key --profile aortiz_staging $AWS_SECRET_ACCESS_KEY_STAGING | |
aws configure set region --profile aortiz_staging $AWS_DEFAULT_REGION | |
aws configure set output --profile aortiz_staging $AWS_DEFAULT_OUTPUT | |
echo -e "\033[38;5;228mAWS \033[38;5;212mstaging\033[38;5;255m profile created." | |
echo -e "\033[38;5;81m------------------------------------\033[38;5;255m\n" | |
aws configure list --profile aortiz_staging | |
# set up aws production profile | |
aws configure set aws_access_key_id --profile aortiz_prod $AWS_ACCESS_KEY_ID_PROD | |
aws configure set aws_secret_access_key --profile aortiz_prod $AWS_SECRET_ACCESS_KEY_PROD | |
aws configure set region --profile aortiz_prod $AWS_DEFAULT_REGION | |
aws configure set output --profile aortiz_prod $AWS_DEFAULT_OUTPUT | |
echo -e "\n\033[38;5;228mAWS \033[38;5;212mproduction\033[38;5;255m profile created." | |
echo -e "\033[38;5;81m------------------------------------\033[38;5;255m\n" | |
aws configure list --profile aortiz_prod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment