Last active
April 19, 2023 19:58
-
-
Save johanforssell/5acf08171cd65f5b6649734962ddb4f4 to your computer and use it in GitHub Desktop.
List all private EC2 AMI whose name begins with the string `workload`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# List all private EC2 AMI whose name begins with the string `workload` | |
# Present the output as a table | |
aws ec2 describe-images \ | |
--query 'Images[*].{created:CreationDate,ami:ImageId,name:Name}' \ | |
--filters "Name=name,Values=workload*" "Name=image-type,Values=machine" "Name=is-public,Values=false" \ | |
--output table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment