Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
ROLE=${1:-}
if [ -z "$ROLE" ]; then
echo "usage: $0 <role arn> [session name]"
exit 1
fi
ROLE_NAME=${ROLE##*/}
SESSION_NAME=${2:-aws-$ROLE_NAME}