Skip to content

Commit

Permalink
allow invoke lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbalcaen committed Apr 20, 2024
1 parent 9e33b0f commit 6093ae9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions state_machines/email_form_fill/state_machine.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@ resource "aws_iam_role_policy" "sfn_lambda_s3_access" {
EOF
}

resource "aws_iam_role_policy" "sfn_lambda_invoke_access" {
name = "sfn_lambda_invoke_access"
role = aws_iam_role.iam_for_sfn.id

policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"lambda:InvokeFunction"
],
"Resource": [
"arn:aws:lambda:*:*:function:*"
]
}
]
}
EOF
}


resource "aws_sfn_state_machine" "sfn_state_machine" {
name = "my-state-machine"
Expand Down

0 comments on commit 6093ae9

Please sign in to comment.