github.com/aspring/packer@v0.8.1-0.20150629211158-9db281ac0f89/website/source/docs/builders/amazon.html.markdown (about) 1 --- 2 layout: "docs" 3 page_title: "Amazon AMI Builder" 4 description: |- 5 Packer is able to create Amazon AMIs. To achieve this, Packer comes with multiple builders depending on the strategy you want to use to build the AMI. 6 --- 7 8 # Amazon AMI Builder 9 10 Packer is able to create Amazon AMIs. To achieve this, Packer comes with 11 multiple builders depending on the strategy you want to use to build the 12 AMI. Packer supports the following builders at the moment: 13 14 * [amazon-ebs](/docs/builders/amazon-ebs.html) - Create EBS-backed AMIs 15 by launching a source AMI and re-packaging it into a new AMI after 16 provisioning. If in doubt, use this builder, which is the easiest to get 17 started with. 18 19 * [amazon-instance](/docs/builders/amazon-instance.html) - Create 20 instance-store AMIs by launching and provisioning a source instance, then 21 rebundling it and uploading it to S3. 22 23 * [amazon-chroot](/docs/builders/amazon-chroot.html) - Create EBS-backed AMIs 24 from an existing EC2 instance by mounting the root device and using a 25 [Chroot](http://en.wikipedia.org/wiki/Chroot) environment to provision 26 that device. This is an **advanced builder and should not be used by 27 newcomers**. However, it is also the fastest way to build an EBS-backed 28 AMI since no new EC2 instance needs to be launched. 29 30 -> **Don't know which builder to use?** If in doubt, use the 31 [amazon-ebs builder](/docs/builders/amazon-ebs.html). It is 32 much easier to use and Amazon generally recommends EBS-backed images nowadays. 33 34 ## Using an IAM Instance Profile 35 36 If AWS keys are not specified in the template, a [credentials](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files) file or through environment variables 37 Packer will use credentials provided by the instance's IAM profile, if it has one. 38 39 The following policy document provides the minimal set permissions necessary for Packer to work: 40 41 ```javascript 42 { 43 "Statement": [{ 44 "Effect": "Allow", 45 "Action" : [ 46 "ec2:AttachVolume", 47 "ec2:CreateVolume", 48 "ec2:DeleteVolume", 49 "ec2:CreateKeypair", 50 "ec2:DeleteKeypair", 51 "ec2:CreateSecurityGroup", 52 "ec2:DeleteSecurityGroup", 53 "ec2:AuthorizeSecurityGroupIngress", 54 "ec2:CreateImage", 55 "ec2:RunInstances", 56 "ec2:TerminateInstances", 57 "ec2:StopInstances", 58 "ec2:DescribeVolumes", 59 "ec2:DetachVolume", 60 "ec2:DescribeInstances", 61 "ec2:CreateSnapshot", 62 "ec2:DeleteSnapshot", 63 "ec2:DescribeSnapshots", 64 "ec2:DescribeImages", 65 "ec2:RegisterImage", 66 "ec2:CreateTags", 67 "ec2:ModifyImageAttribute" 68 ], 69 "Resource" : "*" 70 }] 71 } 72 ```