{
  "builders": [
    {
      "ami_name": "memecaptain-{{timestamp}}",
      "associate_public_ip_address": true,
      "instance_type": "m4.large",
      "region": "us-east-1",
      "source_ami": "ami-1ecae776",
      "spot_price": "auto",
      "spot_price_auto_product": "Linux/UNIX (Amazon VPC)",
      "ssh_pty": true,
      "ssh_username": "ec2-user",
      "subnet_id": "subnet-c7219bec",
      "type": "amazon-ebs",
      "vpc_id": "vpc-732e0c16"
    }
  ],
  "provisioners": [
    {
      "inline": [
        "sudo yum update -y",
        "sudo sed --in-place=.bak --expression='s/repo_upgrade: security/repo_upgrade: none/g' /etc/cloud/cloud.cfg",
        "sudo yum install -y docker git",
        "sudo service docker start",
        "git clone --branch deploy --depth 1 https://github.com/mmb/meme_captain_web.git",
        "pushd meme_captain_web",
        "sudo docker build --rm=true --tag=mm62/meme_captain .",
        "popd",
        "rm -rf meme_captain_web"
      ],
      "type": "shell"
    }
  ]
}

{
  "builders": [
    {
      "ami_name": "memecaptain-{{timestamp}}",
      "associate_public_ip_address": true,
      "instance_type": "m4.large",
      "region": "us-east-1",
      "source_ami": "ami-1ecae776",
      "spot_price": "0.02",
      "ssh_pty": true,
      "ssh_username": "ec2-user",
      "subnet_id": "subnet-c7219bec",
      "type": "amazon-ebs",
      "vpc_id": "vpc-732e0c16"
    }
  ],
  "provisioners": [
    {
      "inline": [
        "sudo yum update -y",
        "sudo sed --in-place=.bak --expression='s/repo_upgrade: security/repo_upgrade: none/g' /etc/cloud/cloud.cfg",
        "sudo yum install -y docker git",
        "sudo service docker start",
        "git clone --branch deploy --depth 1 https://github.com/mmb/meme_captain_web.git",
        "pushd meme_captain_web",
        "sudo docker build --rm=true --tag=mm62/meme_captain .",
        "popd",
        "rm -rf meme_captain_web"
      ],
      "type": "shell"
    }
  ]
}

Set AMI builder spot price to $0.02.
Set AMI builder spot price to $0.02.
