Skip to content

Instantly share code, notes, and snippets.

@hendrixroa
Created March 23, 2023 17:43
Show Gist options
  • Save hendrixroa/1d848b1045b35d5cc22a8a52119da34f to your computer and use it in GitHub Desktop.
Save hendrixroa/1d848b1045b35d5cc22a8a52119da34f to your computer and use it in GitHub Desktop.
Lambda iam policies basic
resource "aws_iam_role_policy" "lambda_basic_policy" {
name = "lambda_${var.lambda_function_name}_basic_policy"
role = aws_iam_role.lambda_role.id
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": [
"arn:aws:logs:*:*:*"
]
}
]
}
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment