Skip to content

A Tiny maintenance tool for all AWS CloudWatch log groups that Retention policy is set to never

Notifications You must be signed in to change notification settings

omerh/aws-cloudwatch-set-logs-expiry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

aws-cloudwatch-set-logs-expiry

This is a small maintanence tool for keeping cloudwatch expiery taht by default are set to Never to 14 days

Most of the time its just forgeting to place the expiery. So just keep the dollars in yout pocket

To build

go get github.com/aws/aws-sdk-go
go build -ldflags "-s -w"

And execute the binary artifact ./aws-cloudwatch-set-logs-expiry

Make sure to have a proper permissions to execute it

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": [
        "logs:DescribeLogGroups",
        "logs:PutRetentionPolicy"
      ],
      "Resource": "*"
    }
  ]
}

About

A Tiny maintenance tool for all AWS CloudWatch log groups that Retention policy is set to never

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published