When you speak from ISO, that tells me that you want to create a trusted base virtual machine. First you want to install locally from scratch and import it into ec2 as a trusted private AMI. If you don't mind using veewee there is an awesome post using veewee instead of the packer here: veewee This is all set up for CentOS. All you have to do is clone and configure it for your use.
But since you are looking for a packer like me, then you need to create a virtual box constructor in the packer and some aws-cli commands to load and create AMI from OVA. Unfortunately, Packer does not have a post processor. You can then use the tramp to link to the new AMI for ec2-based development, and use the vagrant-aws plugin to create a new ami from your trusted ami base.
The following are the steps to be taken:
1.) Create an S3 bucket to import images.
2.) Set up your AWS account. Create the IAM vmimport role and policy, as well as the X509 key and key pair, if you do not have one. You will need this to register a private AMI. You will also specify the name of the bucket for the policy.
3.) Create a virtual machine using VirtualBox using the packbox virtualbox-iso package builder and get the image in ova format.
4.) use aws-cli with your aws account to load OVA into the bucket you created. aws s3 cp .
5.) Register OVA as ami. To do this, you will use the aws ec2 import-image command. (This part can last 30 minutes - 1 hour).
You can track your progress with: aws ec2 describe-import-image-tasks AMI will appear on your personal AMI list when this is done.
source share