Skip to content

Commit 5c7009c

Browse files
Setup infrastructure permissions to spawn new lambda from existing lambda
1 parent 73e4d99 commit 5c7009c

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

infrastructure/infrastructure.go

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,22 @@ func (infra *Infrastructure) createIAMLambdaRolePolicy(roleName string) error {
202202
PolicyDocument: aws.String(`{
203203
"Version": "2012-10-17",
204204
"Statement": [
205-
{
206-
"Action": [
207-
"sqs:SendMessage"
208-
],
209-
"Effect": "Allow",
210-
"Resource": "arn:aws:sqs:*:*:goad-*"
211-
},
205+
{
206+
"Action": [
207+
"sqs:SendMessage"
208+
],
209+
"Effect": "Allow",
210+
"Resource": "arn:aws:sqs:*:*:goad-*"
211+
},
212+
{
213+
"Effect": "Allow",
214+
"Action": [
215+
"lambda:Invoke*"
216+
],
217+
"Resource": [
218+
"arn:aws:lambda:*:*:goad:*"
219+
]
220+
},
212221
{
213222
"Action": [
214223
"logs:CreateLogGroup",

0 commit comments

Comments
 (0)