Skip to content

Instantly share code, notes, and snippets.

@mattgillard
Last active May 23, 2018 03:52
Show Gist options
  • Save mattgillard/5eb40986631c9a5f6c06059e859c8f10 to your computer and use it in GitHub Desktop.
Save mattgillard/5eb40986631c9a5f6c06059e859c8f10 to your computer and use it in GitHub Desktop.
AWS CLI Tips / Tricks

AWS CLI Tips / Tricks

List of all images by Red Hat sorted by most recent first:

$ aws ec2 describe-images --owners 309956199498 --query "reverse(sort_by(Images, &CreationDate)[*].[CreationDate,Name,ImageId])[:2]" --filters "Name=name,Values=RHEL-7.?*GA*" --region ap-southeast-2 --output table

Link to JMESPath cheatsheet: https://gist.github.com/magnetikonline/6a382a4c4412bbb68e33e137b9a74168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment