Created
September 3, 2025 10:41
-
-
Save harunhasdal/1b946b912f4451fec9d26c4bfe7b654d to your computer and use it in GitHub Desktop.
Set default aws profile configuration in `~/.aws/config` from a named profile. Usage: `./set-aws-default-profile.sh <profile_name>`
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
| #!/bin/bash | |
| echo "Updating default profile (~/.aws/config) with values from $1" | |
| region=$(aws configure get $1.region) | |
| credential_process=$(aws configure get $1.credential_process) | |
| aws configure set default.region "$region" | |
| aws configure set default.credential_process "$credential_process" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment