Last active
December 14, 2023 15:07
-
-
Save danrigsby/11354917 to your computer and use it in GitHub Desktop.
Get AMI ID from a packer build
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
packer build packer.json 2>&1 | sudo tee output.txt | |
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For multiple AWS regions, try: