Skip to content

Instantly share code, notes, and snippets.

erikcw / nginx.conf
Last active August 22, 2023 10:58
Simple nginx lua script to add UUID to each request for end to end request tracking.
# Dependencies
# nginx_lua
# lua uuid module (luarocks install uuid)
http {
# this will be the request id
map $host $request_uuid {
default '';
for cert in $(/bin/ls -1 ${BOOT2DOCKER_CERTS_DIR}); do
HASH_FILE=${CERTS_DIR}/$(/usr/local/bin/openssl x509 -noout -hash -in ${SRC_CERT_FILE} 2>/dev/null)
irgeek /
Last active December 10, 2021 16:42
Finding AMIs after building an image with Packer

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
  • - Shows how to use the template to do a build and retrieve the AMI information