AWS CLI frequent commands
Retrieve current user
aws-sts get-caller-identityList users
aws configure list
aws configure list-profilesView profile data
vim ./aws/credentialsCloudFormation
List stacks
aws cloudformation --list-stacksDelete a stack
aws cloudformation delete-stack --stack-name <my_stack> --region <region>region is optional especially if only deployed to one region
Billing (“Cost explorer”)
Usage for month
aws ce get-cost-and-usage --time-period Start=$(date +%Y-%m-01),End=$(date -d @$(( $(date +%s) + 86400 )) +%Y-%m-%d) --granularity MONTHLY --metrics "UnblendedCost" "UsageQuantityRetrieve current user
aws-sts get-caller-identityList users
aws configure list
aws configure list-profilesView profile data
vim ./aws/credentials