Skip to content

Commit 8461925

Browse files
committed
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.
1 parent 85f58e6 commit 8461925

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ locals {
183183
"logs:CreateLogStream",
184184
"logs:PutLogEvents"
185185
],
186-
"Resource" : aws_cloudwatch_log_group.this.arn,
186+
"Resource" : "${aws_cloudwatch_log_group.this.arn}:*",
187187
"Effect" : "Allow"
188188
}
189189
]
@@ -196,7 +196,7 @@ locals {
196196
"logs:CreateLogStream",
197197
"logs:PutLogEvents"
198198
],
199-
"Resource" : aws_cloudwatch_log_group.this.arn,
199+
"Resource" : "${aws_cloudwatch_log_group.this.arn}:*",
200200
"Effect" : "Allow"
201201
},
202202
{
@@ -224,7 +224,7 @@ locals {
224224
data "archive_file" "this" {
225225
type = "zip"
226226
source_dir = "${path.module}/package/"
227-
output_path = "${path.module}/aws-stop-start-resources-3.1.0.zip" # The version should match with the latest git tag
227+
output_path = "${path.module}/aws-stop-start-resources-3.1.1.zip" # The version should match with the latest git tag
228228
}
229229

230230
# Create Lambda function for stop or start aws resources

0 commit comments

Comments
 (0)