Skip to content

Commit

Permalink
fix(log): grant lambda scheduler to write log
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
diodonfrost committed Feb 25, 2021
1 parent 85f58e6 commit 8461925
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
Expand All @@ -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"
},
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8461925

Please sign in to comment.