Finding Packer-generated AMIs automatically after builds
The basic technique is to have Packer add a tag with a unique value during the build, and use AWS' built-in filtering capabilities to find that specific AMI after the build finishes.
- template.json - Shows the settings that need to be added to your template
- build.sh - Shows how to use the template to do a build and retrieve the AMI information
This works awesome. Just a few tweaks folks may want to consider.
--raw-output
onjq
to avoid quotes around the string: