Skip to content

Instantly share code, notes, and snippets.

@stask
Created May 24, 2018 08:53
Show Gist options
  • Save stask/0036d14caa69349a0433c990ae9b84aa to your computer and use it in GitHub Desktop.
Save stask/0036d14caa69349a0433c990ae9b84aa to your computer and use it in GitHub Desktop.
List AMIs for Amazon Linux 2 with creation dates and descriptions
#!/usr/bin/env bash
aws_profile=$1
aws --profile=$aws_profile ec2 describe-images --owners self amazon --filters "Name=name,Values=amzn2*gp2" | jq '.Images[] | {created: .CreatedDate, description: .Description, ami: .ImageId}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment