Skip to content

Instantly share code, notes, and snippets.

@peterdenham
Created October 7, 2019 15: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 peterdenham/c6b2dade0968a00fe130f8267abaee7b to your computer and use it in GitHub Desktop.
Save peterdenham/c6b2dade0968a00fe130f8267abaee7b to your computer and use it in GitHub Desktop.
# get the latest public ubuntu bionic image from aws using the aws ruby sdk
AWS::EC2.images(
executable_users: ['all'],
filters: [{name: 'name', values: ['ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*']}]
).max_by(&:creation_date)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment