Skip to content

Commit

Permalink
feat: Added CloudWatch Log Retention Manager (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko committed Jun 27, 2023
1 parent a1d5386 commit c391ec6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions examples/cloudwatch-log-retention-manager/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Triggers of AWS Lambda examples
# CloudWatch Log Retention Manager example

Configuration in this directory creates AWS Lambda Function with some triggers (eg. CloudWatch Events).
Terraform module that creates a Lambda Function triggered by EventBridge Scheduler.

Lambda Function goes through all AWS regions and sets the retention period of CloudWatch Logs to the numeric value (`RETAIN_DAYS`) if it wasn't specified already.

This Terraform module is the part of [serverless.tf framework](https://github.com/antonbabenko/serverless.tf), which aims to simplify all operations when working with the serverless in Terraform.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion examples/cloudwatch-log-retention-manager/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module "cloudwatch_log_retention_manager" {
RETAIN_DAYS = 90
}

schedule_expression = "rate(1 minute)"
schedule_expression = "rate(6 hours)"
# role_arn = "arn:aws:iam::835367859851:role/my-custom-role"

tags = local.tags
Expand Down

0 comments on commit c391ec6

Please sign in to comment.