Packer with amazon-ebs VS amazon-instance

amazon-ebsamazon-instance-storeamazon-web-servicespacker

I am looking into using Packer to generate some of our VMs, and I have been working thorough the example here. When I try to run the packer build command I get the following error:

==> amazon-ebs: Error launching source instance: The specified instance type can only be used in a VPC. A subnet ID or network
interface ID is required to carry out the request.
(VPCResourceNotSpecified)

I resolved this issue (see edit), but I while digging I found this page stating that I can also use an amazon instance, but it recommends using the amazon-ebs build instead.

My question is, are there any drawbacks from using amazon-instance over amazon-ebs, or vice versa? It seems as if ebs will be much easier to spin up and maintain. Is that the case? Do I lose anything by using one or the other?

Edit The issue I was running into was not related to permissions, but having an instance_type of "t2.micro" instead of "m3.medium". I would still like to know the drawbacks of ebs vs instance though.

Best Answer

EBS is using networked storage for your EC2 instance's root device, it's easy to spin up an instance and create an AMI using EBS because the volume is already available outside your instance. EBS also allows for a larger root device -- greater than 8GB.

Instance-store (or ephemeral) root devices are somewhat more resilient as they don't rely on a network connection but they are harder to create AMIs for: you must load keys onto the packer-launched machine, bundle the root device, upload it to S3 and then create an AMI using the S3 bucket. Instance-store root devices are usually around 8GB which can be a drawback as well.

I like sticking with instance-store EC2 Instance as a personal preference -- anecdotally the times I've been bit by EC2 being down it was largely due to EBS issues.