Skip to content

Exports log from cloud watch to S3 in an automated fashion using Lambda. The Lambda function relies on the SSM parameter store to manage its state. The frequency of the operation is controlled by EventBridge.

Notifications You must be signed in to change notification settings

johnny550/aws-logs-exporter

Repository files navigation

terraform-aws-log-exporter

REFERENCE

Credits to:: The DNX Labs Lint Status LICENSE

This module creates a lambda function that exports log groups on the AWS account and region deployed(default every 4 hours).

It will only export each log group if it has the tag ExportToS3=true, if the last export was more than 24 hours ago it creates an export task to the S3_BUCKET defined saving the current timestamp in a SSM parameter.

This module creates:

  • A lambda function
  • A bucket to receive the logs
  • A Cloudwatch to export the logs

Set a tag {ExportToS3:true} to a Cloudwatch log group

aws --region logs tag-log-group --log-group-name <my/log/group/name> --tags ExportToS3=true

About

Exports log from cloud watch to S3 in an automated fashion using Lambda. The Lambda function relies on the SSM parameter store to manage its state. The frequency of the operation is controlled by EventBridge.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages