This Packer template will built an extremely bare CentOS 7 image from the NetInstall ISO, intended for deployment to EC2.
This image conforms to Amazon's guidelines, and uses cloud init to provision the image upon deployment.
Follow Amazon's import/export guide to learn how to deploy the OVA once created.
To use a different kickstart script, just set the profile
accordingly.
packer build -var 'profile=ext4' template.json
aws s3 cp output-ext4/centos7-ec2-ext4.ova s3://my-ami-bucket/centos7-ec2-ext4.ova
aws ec2 import-image --cli-input-json '{ "Description": "CentOS 7 EXT4", "DiskContainers": [ { "Description": "CentOS 7 EXT4", "UserBucket": { "S3Bucket": "my-ami-bucket", "S3Key" : "centos7-ec2-ext4.ova" } } ]}'