Advertisement
Guest User

Untitled

a guest
Dec 28th, 2016
2,107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1.  
  2. {
  3. "Version": "2012-10-17",
  4. "Statement": [
  5. {
  6. "Action": [
  7. "cloudformation:DescribeStackResources",
  8. "cloudformation:CreateStack",
  9. "cloudformation:DescribeStackEvents",
  10. "cloudformation:DescribeStackResource",
  11. "cloudformation:UpdateStack",
  12. "cloudformation:DescribeStacks",
  13. "cloudformation:DeleteStack"
  14. ],
  15. "Effect": "Allow",
  16. "Resource": "arn:aws:cloudformation:us-east-1:XXX:stack/service_name*"
  17. },
  18. {
  19. "Effect": "Allow",
  20. "Action": [
  21. "s3:CreateBucket"
  22. ],
  23. "Resource": [
  24. "*" // can limit this also to "arn:aws:s3:::service_name-*-serverlessdeploymentbucket-*" also
  25. ]
  26. },
  27. {
  28. "Effect": "Allow",
  29. "Action": [
  30. "s3:PutObject",
  31. "s3:GetObject",
  32. "s3:ListBucket",
  33. "s3:DeleteObject",
  34. "s3:DeleteBucket",
  35. "s3:ListBucketVersions"
  36. ],
  37. "Resource": [
  38. "arn:aws:s3:::service_name-*-serverlessdeploymentbucket-*"
  39. ]
  40. },
  41. {
  42. "Effect": "Allow",
  43. "Action": [
  44. "lambda:GetFunction",
  45. "lambda:CreateFunction",
  46. "lambda:DeleteFunction",
  47. "lambda:UpdateFunctionConfiguration",
  48. "lambda:UpdateFunctionCode",
  49. "lambda:ListVersionsByFunction",
  50. "lambda:PublishVersion",
  51. "lambda:CreateAlias",
  52. "lambda:DeleteAlias",
  53. "lambda:UpdateAlias",
  54. "lambda:GetFunctionConfiguration"
  55. ],
  56. "Resource": [
  57. "arn:aws:lambda:us-east-1:XXX:function:service_name*"
  58. ]
  59. },
  60. {
  61. "Effect": "Allow",
  62. "Action": [
  63. "iam:PassRole"
  64. ],
  65. "Resource": [
  66. "arn:aws:iam::XXX:role/service-role/yourcustomrolename*"
  67. ]
  68. }
  69.  
  70. ]
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement