Created
March 31, 2022 18:24
-
-
Save nhammad/715e147c6bc3147622d8186ec001512d 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
resource "aws_iam_role_policy" "lambda" { | |
name = "s3_policy" | |
role = aws_iam_role.conversion_lambda_role.id | |
policy = jsonencode({ | |
Version = "2012-10-17" | |
Statement = [ | |
{ | |
Effect = "Allow" | |
Action = [ | |
"kms:Decrypt", | |
"kms:GenerateDataKey", | |
"s3:DeleteObject" | |
"s3:ListBucket", | |
"s3:HeadObject", | |
"s3:GetObject", | |
"s3:GetObjectVersion", | |
"s3:PutObject" | |
] | |
Resource = [ | |
"*", | |
] | |
} | |
] | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment