Get Account ID $ aws sts get-caller-identity --query Account --output text Get Current IAM User ARN $ aws sts get-caller-identity --query Arn --output text Get Current IAM User Name $ aws sts get-caller-identity --query Arn --output text | sed 's/.*\///g'