Skip to content

Instantly share code, notes, and snippets.

@nhammad
Created March 31, 2022 18:24
Show Gist options
  • Save nhammad/715e147c6bc3147622d8186ec001512d to your computer and use it in GitHub Desktop.
Save nhammad/715e147c6bc3147622d8186ec001512d to your computer and use it in GitHub Desktop.
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