Created
August 29, 2022 18:43
-
-
Save KyMidd/874033b66f9e8443a8a22154470aa435 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_policy" "lambda_policy" { | |
| name = "HttpHeaderShimLambdaPolicy" | |
| description = "Http Header Shim Lambda Policy" | |
| policy = jsonencode({ | |
| "Version" : "2012-10-17", | |
| "Statement" : [ | |
| { | |
| "Action" : [ | |
| "cloudwatch:PutMetricData", | |
| "logs:CreateLogGroup", | |
| "logs:CreateLogStream", | |
| "logs:PutLogEvents" | |
| ], | |
| "Resource" : [ | |
| "*" | |
| ], | |
| "Effect" : "Allow", | |
| "Sid" : "CloudWatchPutMetricData" | |
| } | |
| ] | |
| }) | |
| } | |
| resource "aws_iam_role_policy_attachment" "lambda-policy" { | |
| role = aws_iam_role.lambda_role.name | |
| policy_arn = aws_iam_policy.lambda_policy.arn | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment