mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
21 lines
No EOL
545 B
HCL
21 lines
No EOL
545 B
HCL
# IAM role for both Lambdas (can be shared)
|
|
resource "aws_iam_role" "lambda_exec_role" {
|
|
name = "lambda-exec-role"
|
|
|
|
assume_role_policy = jsonencode({
|
|
Version = "2012-10-17",
|
|
Statement = [{
|
|
Effect = "Allow",
|
|
Principal = {
|
|
Service = "lambda.amazonaws.com"
|
|
},
|
|
Action = "sts:AssumeRole"
|
|
}]
|
|
})
|
|
}
|
|
|
|
|
|
resource "aws_iam_role_policy_attachment" "lambda_basic_execution" {
|
|
role = aws_iam_role.lambda_exec_role.name
|
|
policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
|
|
} |