- JDK 11
- Tomcat 9
Pre-requisites
- Packer
- Git
- Active AWS account
- Clone this repo
$ git clone {repo link}- Validate the Packer AMI template.
$ packer validate ami.json- Build the AMI by giving the required information in command line. Make alterations on the variables as you need.
$ packer build \
-var 'aws_access_key={your access key}' \
-var 'aws_secret_key={your secret key}' \
-var 'subnet_id={your subnet id}' \
-var 'prod_account_id={your prod aws id}' \
ami.jsonor Build the AMI by filling in the vars.json file.
$ packer build -var-file=./vars.json ami.json