Skip to content

Instantly share code, notes, and snippets.

@jimmdd
Last active April 23, 2020 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jimmdd/a287a3b4cf52a9d6793927ac0680f736 to your computer and use it in GitHub Desktop.
Save jimmdd/a287a3b4cf52a9d6793927ac0680f736 to your computer and use it in GitHub Desktop.
IAM permission sets for deploying next-serverless component in code build env
{
"Version": "2012-10-17",
"Statement":
[
{
"Action":
[
"cloudfront:CreateCloudFrontOriginAccessIdentity",
"cloudfront:CreateDistribution",
"cloudfront:UpdateDistribution",
"cloudfront:GetDistributionConfig"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": ["cloudfront:CreateInvalidation"],
"Resource": "arn:aws:cloudfront::${YOUR ACCOUNT ID}:distribution/${YOUR CLOUDFRONT DISTRIBUTION ID}",
"Effect": "Allow"
},
{
"Action":
[
"iam:CreateServiceLinkedRole",
"iam:CreateRole",
"iam:AttachRolePolicy",
"iam:DetachRolePolicy",
"iam:PassRole"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": ["lambda:GetFunction", "lambda:EnableReplication*"],
"Resource": "*",
"Effect": "Allow"
},
{
"Action":
[
"s3:CreateBucket",
"s3:ListBucket",
"s3:ListBucketVersions",
"s3:PutObject",
"s3:PutBucketPolicy",
"s3:PutAccelerateConfiguration",
"s3:PutAnalyticsConfiguration",
"s3:PutEncryptionConfiguration",
"s3:GetObject",
"s3:GetBucketPolicy",
"s3:GetAccelerateConfiguration",
"s3:GetAnalyticsConfiguration",
"s3:GetEncryptionConfiguration",
"s3:DeleteObject",
"s3:DeleteBucket",
"s3:DescribeJob"
],
"Resource":
["arn:aws:s3:::${YOUR BUCKET NAME}", "arn:aws:s3:::${YOUR BUCKET NAME}/*"],
"Effect": "Allow"
}
]
}
@jimmdd
Copy link
Author

jimmdd commented Apr 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment