Created
January 17, 2020 16:20
-
-
Save hervekhg/c40648397565079333417784f8748edf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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