Skip to content

Instantly share code, notes, and snippets.

@etiennemarais
Forked from MattSurabian/PackerPolicy.json
Last active March 1, 2016 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save etiennemarais/341993f500fb65773212 to your computer and use it in GitHub Desktop.
Save etiennemarais/341993f500fb65773212 to your computer and use it in GitHub Desktop.
Minimum IAM policy required by AWS for Packer to do its thing.https://github.com/mitchellh/packer Permissions are broken out by API functionality and a resource array has been defined with a wild card for each group. For tighter security resource level permissions can be applied per this documentation: http://aws.typepad.com/aws/2013/07/resource…
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PackerSecurityGroupAccess",
"Action": [
"ec2:CreateSecurityGroup",
"ec2:DeleteSecurityGroup",
"ec2:DescribeSecurityGroups",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:RevokeSecurityGroupIngress",
"ec2:AttachVolume",
"ec2:CreateVolume",
"ec2:DeleteVolume",
"ec2:CreateKeypair",
"ec2:DeleteKeypair",
"ec2:DescribeSubnets",
"ec2:CopyImage",
"ec2:DescribeVolumes",
"ec2:DetachVolume",
"ec2:ModifyImageAttribute"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Sid": "PackerAMIAccess",
"Action": [
"ec2:CreateImage",
"ec2:RegisterImage",
"ec2:DeregisterImage",
"ec2:DescribeImages"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Sid": "PackerSnapshotAccess",
"Action": [
"ec2:CreateSnapshot",
"ec2:DeleteSnapshot",
"ec2:DescribeSnapshots"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Sid": "PackerInstanceAccess",
"Action": [
"ec2:RunInstances",
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:RebootInstances",
"ec2:TerminateInstances",
"ec2:DescribeInstances",
"ec2:CreateTags"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Sid": "PackerKeyPairAccess",
"Action": [
"ec2:CreateKeyPair",
"ec2:DeleteKeyPair",
"ec2:DescribeKeyPairs"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Sid": "PackerS3Access",
"Action": [
"s3:Get*",
"s3:List*",
"s3:PutObject*",
"s3:DeleteObject*"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Sid": "PackerS3BucketAccess",
"Action": [
"s3:ListAllMyBuckets",
"s3:CreateBucket"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment