|
1 | | -# This is the IAM policy needed to deploy a new stack (i.e. when AWS Lambda is being set up from scratch) or a new function |
2 | | -# (replace ${account_id} with your Amazon Account ID) |
| 1 | +# IAM policy for CI to deploy a new AWS SAM stack or add new functions. |
| 2 | +# Replace ${account_id} with your AWS Account ID. |
3 | 3 |
|
4 | 4 | { |
5 | 5 | "Version": "2012-10-17", |
|
31 | 31 | "s3:ListBucket", |
32 | 32 | "s3:CreateBucket", |
33 | 33 | "s3:DeleteBucket", |
34 | | - "s3:GetEncryptionConfiguration", |
| 34 | + "s3:GetBucketLocation", |
35 | 35 | "s3:PutEncryptionConfiguration", |
36 | | - "s3:GetBucketPolicy", |
37 | 36 | "s3:PutBucketPolicy", |
38 | 37 | "s3:PutBucketTagging", |
39 | | - "s3:GetBucketAcl", |
40 | | - "s3:PutBucketAcl" |
| 38 | + "s3:PutBucketVersioning", |
| 39 | + "s3:PutLifecycleConfiguration" |
41 | 40 | ], |
42 | 41 | "Resource": [ |
43 | | - "arn:aws:s3:::cryfs-web-backend-*" |
| 42 | + "arn:aws:s3:::aws-sam-cli-managed-default-samclisourcebucket-*", |
| 43 | + "arn:aws:s3:::aws-sam-cli-managed-default-samclisourcebucket-*/*" |
44 | 44 | ] |
45 | 45 | }, |
46 | 46 | { |
|
54 | 54 | "cloudformation:CreateChangeSet", |
55 | 55 | "cloudformation:ExecuteChangeSet", |
56 | 56 | "cloudformation:DescribeStackEvents", |
57 | | - "cloudformation:ListStackResources" |
| 57 | + "cloudformation:ListStackResources", |
| 58 | + "cloudformation:GetTemplateSummary" |
58 | 59 | ], |
59 | 60 | "Resource": [ |
60 | | - "arn:aws:cloudformation:us-east-1:${account_id}:stack/cryfs-web-backend-*" |
| 61 | + "arn:aws:cloudformation:us-east-1:${account_id}:stack/cryfs-web-backend/*", |
| 62 | + "arn:aws:cloudformation:us-east-1:${account_id}:stack/aws-sam-cli-managed-default/*" |
61 | 63 | ] |
62 | 64 | }, |
63 | 65 | { |
|
67 | 69 | "cloudformation:GetTemplate", |
68 | 70 | "cloudformation:ValidateTemplate" |
69 | 71 | ], |
70 | | - "Resource": [ |
71 | | - "*" |
72 | | - ] |
| 72 | + "Resource": "*" |
73 | 73 | }, |
74 | 74 | { |
75 | 75 | "Sid": "Lambda", |
|
84 | 84 | "lambda:ListVersionsByFunction", |
85 | 85 | "lambda:PublishVersion", |
86 | 86 | "lambda:UpdateFunctionCode", |
87 | | - "lambda:AddPermission" |
| 87 | + "lambda:AddPermission", |
| 88 | + "lambda:RemovePermission" |
88 | 89 | ], |
89 | 90 | "Resource": "arn:aws:lambda:us-east-1:${account_id}:function:cryfs-web-backend-*" |
90 | 91 | }, |
|
0 commit comments