Skip to content

Instantly share code, notes, and snippets.

@nmarley
Last active April 13, 2021 15:18
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 nmarley/e8744c74bec155798662478823a55947 to your computer and use it in GitHub Desktop.
Save nmarley/e8744c74bec155798662478823a55947 to your computer and use it in GitHub Desktop.
Get latest Alpine AMI
#! /bin/bash
# get latest alpine linux AMI
aws ec2 describe-images --output text --filters Name=owner-id,Values=538276064493 Name=name,Values='alpine-ami-3.13*-x86_64*' Name=architecture,Values=x86_64 Name=state,Values=available --query 'max_by(Images[], &CreationDate).ImageId'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment