From 8461925dd1842ebbe643bf33fbc1ae00630b75ba Mon Sep 17 00:00:00 2001 From: diodonfrost Date: Thu, 25 Feb 2021 22:17:49 +0100 Subject: [PATCH] fix(log): grant lambda scheduler to write log Lambda was no longer working when it try to write log in aws log-group, doesn't know why. This commit allow lambda scheduler to create log streams in its own Cloudwatch log-group. --- main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index d6675fb5..e3065132 100644 --- a/main.tf +++ b/main.tf @@ -183,7 +183,7 @@ locals { "logs:CreateLogStream", "logs:PutLogEvents" ], - "Resource" : aws_cloudwatch_log_group.this.arn, + "Resource" : "${aws_cloudwatch_log_group.this.arn}:*", "Effect" : "Allow" } ] @@ -196,7 +196,7 @@ locals { "logs:CreateLogStream", "logs:PutLogEvents" ], - "Resource" : aws_cloudwatch_log_group.this.arn, + "Resource" : "${aws_cloudwatch_log_group.this.arn}:*", "Effect" : "Allow" }, { @@ -224,7 +224,7 @@ locals { data "archive_file" "this" { type = "zip" source_dir = "${path.module}/package/" - output_path = "${path.module}/aws-stop-start-resources-3.1.0.zip" # The version should match with the latest git tag + output_path = "${path.module}/aws-stop-start-resources-3.1.1.zip" # The version should match with the latest git tag } # Create Lambda function for stop or start aws resources