Skip to content

Instantly share code, notes, and snippets.

@hervekhg
Created February 19, 2020 14:47
Show Gist options
  • Save hervekhg/e7eb6081c2eac86cd40fd3ca3e779b65 to your computer and use it in GitHub Desktop.
Save hervekhg/e7eb6081c2eac86cd40fd3ca3e779b65 to your computer and use it in GitHub Desktop.
data "aws_iam_policy_document" "lambda_policy_doc" {
statement {
effect = "Allow"
actions = [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents",
"config:PutEvaluations",
]
resources = [
"*",
]
}
statement {
effect = "Allow"
actions = [
"s3:ListBuckets",
"s3:ListAllMyBuckets",
"s3:GetBucketEncryption",
"s3:GetEncryptionConfiguration",
"s3:PutEncryptionConfiguration",
"ec2:DescribeRouteTables",
"ec2:DeleteVpcEndpoints",
"ec2:DescribeVpcEndpoints",
"ec2:CreateVpcEndpoint",
"ec2:CreateTags"
]
resources = [
"*"
]
}
}
data "aws_iam_policy_document" "assume_role_policy" {
statement {
actions = [
"sts:AssumeRole",
]
principals {
type = "Service"
identifiers = ["lambda.amazonaws.com"]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment