Skip to content

Instantly share code, notes, and snippets.

@dannyfallon
Last active August 29, 2015 14:09
Show Gist options
  • Save dannyfallon/79dd7b40ebcb1b574844 to your computer and use it in GitHub Desktop.
Save dannyfallon/79dd7b40ebcb1b574844 to your computer and use it in GitHub Desktop.
PUBLIC GIST: AWS CLI Magic Fu
# List all access keys for every IAM user
aws iam list-users | jq '.Users[].UserName' | sed "s/\"//g" | xargs -I {} aws iam list-access-keys --user={}
# Enable Metrics Collection on ASGs that don't have it
aws autoscaling describe-auto-scaling-groups | jq '.AutoScalingGroups[] | select(.EnabledMetrics==[]).AutoScalingGroupName' | xargs -I {} aws autoscaling enable-metrics-collection --auto-scaling-group-name {} --granularity "1Minute"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment