#!/bin/bash

if [ -z $1 ]; then
    echo "Available AWS Profiles:"
    grep -E '^\[(.+)\]$' ~/.aws/credentials | sed 's/[][]//g'
else
    export AWS_DEFAULT_PROFILE=$1
    echo "AWS Profile set to $1"
fi
