This repository contains a Packer template for building a Varnish AMI for accelerating WordPress sites.
First, you need to be able to authenticate to AWS. You can learn how to do that at Packer documentation's page.
After having authenticated to AWS, you should run the following in the root directory of this project:
$ packer build -var git_sha=$(git rev-parse --short HEAD) varnish-wordpress.json
AMIs are regional resources, and by default, Packer will build the AMI in the us-east-1
region. If you want to build the AMI in another AWS region, you can pass it as a variable this way:
$ packer build -var aws_region="sa-east-1" -var git_sha=$(git rev-parse --short HEAD) varnish-wordpress.json