Skip to content

Instantly share code, notes, and snippets.

@jmhale
Created January 4, 2021 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmhale/46fb212c3256340be6eca2708158dffb to your computer and use it in GitHub Desktop.
Save jmhale/46fb212c3256340be6eca2708158dffb to your computer and use it in GitHub Desktop.
Returns all AWS EC2 Instance IDs with pending service events
aws ec2 describe-instance-status --query 'InstanceStatuses[?length(Events || `[]`) > `0`]' | jq -r '.[] | "\(.InstanceId)\t\(.Events[].Code)"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment