Skip to content

Instantly share code, notes, and snippets.

@hervekhg
Created January 17, 2020 16:20
Show Gist options
  • Save hervekhg/c40648397565079333417784f8748edf to your computer and use it in GitHub Desktop.
Save hervekhg/c40648397565079333417784f8748edf 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",
]
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