aws ec2 describe-images \
--filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*" \
--query 'Images[*].[ImageId,CreationDate]' --output text \
| sort -k2 -r \
| head -n1
Which returns ami-092d0fe375260a228 , it is the latest one.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAGr0K9dkPcsy1cJaaGxNke2%3D03CPy-p%3DY8NV8wVsu9-GZkZT4A%40mail.gmail.com.
Your describe-images command doesn't filter based on owners which makes it vulnerable to finding images from untrusted/malicious sources.
To unsubscribe from this group and stop receiving emails from it, send an email to packe...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/e3527a38-f7d7-4724-98a7-395074471820%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAPxBRp6B6QwW5dy0thzq7SvG%2BAZy-masWsE%2BgV4M-ZLNO4tT0Q%40mail.gmail.com.