brew install packer
packer version
vim ami.json
packer fix ami_tmp.json > ami.json
Or
packer fix ecs_tmp.json > ecs.json
packer validate ami.json
Or
packer validate ecs.json
cd packer
packer build ami.json
packer build ecs.json
PACKER_LOG=1 packer build ami.json