Open indy-singh opened 7 months ago
The terraform for this resource looks like
data "aws_iam_policy_document" "assume_role" {
provider = aws.region
statement {
effect = "Allow"
principals {
type = "Service"
identifiers = ["lambda.amazonaws.com"]
}
actions = ["sts:AssumeRole"]
}
}
resource "aws_iam_role" "lambda_execution_role" {
provider = aws.region
name = "GenericLambdaExecutionRole"
assume_role_policy = data.aws_iam_policy_document.assume_role.json
managed_policy_arns = [
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
]
}
https://github.com/indy-singh/multi-region-active-active-latency-based-routing/blob/5b0e833b9cb01e41b21d3c7409198ef7c53c9410/stack/data.tf#L3