1
0

aws-profile 204 B

123456789
  1. #!/bin/bash
  2. if [ -z $1 ]; then
  3. echo "Available AWS Profiles:"
  4. grep -E '^\[(.+)\]$' ~/.aws/credentials | sed 's/[][]//g'
  5. else
  6. export AWS_DEFAULT_PROFILE=$1
  7. echo "AWS Profile set to $1"
  8. fi