https://github.com/DNXLabs/terraform-aws-log-exporter
This module creates a lambda function that exports log groups on the AWS account and region deployed.
https://github.com/DNXLabs/terraform-aws-log-exporter
cloudwatch export logs
Last synced: about 1 year ago
JSON representation
This module creates a lambda function that exports log groups on the AWS account and region deployed.
- Host: GitHub
- URL: https://github.com/DNXLabs/terraform-aws-log-exporter
- Owner: DNXLabs
- License: apache-2.0
- Created: 2020-04-11T01:33:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-06T10:13:23.000Z (almost 2 years ago)
- Last Synced: 2024-11-08T12:42:39.401Z (over 1 year ago)
- Topics: cloudwatch, export, logs
- Language: HCL
- Homepage: https://modules.dnx.one/
- Size: 39.1 KB
- Stars: 29
- Watchers: 3
- Forks: 23
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# terraform-aws-log-exporter
[](https://github.com/DNXLabs/terraform-aws-log-exporter/actions)
[](https://github.com/DNXLabs/terraform-aws-log-exporter/blob/master/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
## Requirements
| Name | Version |
|------|---------|
| terraform | >= 0.12.0 |
| aws | >= 4.61.0 |
| random | >= 3.4.0 |
## Providers
| Name | Version |
|------|---------|
| archive | n/a |
| aws | >= 4.61.0 |
| random | >= 3.4.0 |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| cloudwatch\_logs\_export\_bucket | Bucket to export logs | `string` | `""` | no |
| runtime | Runtime version of the lambda function | `string` | `"python3.10"` | no |
## Outputs
No output.
## Authors
Module managed by [DNX Solutions](https://github.com/DNXLabs).
## License
Apache 2 Licensed. See [LICENSE](https://github.com/DNXLabs/terraform-aws-log-exporter/blob/master/LICENSE) for full details.