Skip to content

Instantly share code, notes, and snippets.

@harunhasdal
Created September 3, 2025 10:41
Show Gist options
  • Select an option

  • Save harunhasdal/1b946b912f4451fec9d26c4bfe7b654d to your computer and use it in GitHub Desktop.

Select an option

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>`
#!/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