AWS CloudWatch Logs daily archive to s3 bucket
Project description
AWS Daily CloudWatch Logs Archiver
AWS CloudWatch Logs daily(13:00Z) archive to s3 bucket.
Resources
This construct creating resource list.
- S3 Bucket (log-archive-xxxxxxxx from @yicr/aws-secure-log-bucket)
- Lambda function execution role
- Lambda function
- EventBridge Scheduler execution role
- EventBridge Scheduler Group
- EventBridge Scheduler (this construct props specified count)
Install
TypeScript
npm install @gammarer/aws-daily-cloud-watch-logs-archiver
# or
yarn add @gammarer/aws-daily-cloud-watch-logs-archiver
Python
pip install gammarer.aws-daily-cloud-watch-logs-archiver
Example
npm install @gammarer/aws-daily-cloud-watch-logs-archiver
import { DailyCloudWatchLogsArchiver } from '@gammarer/aws-daily-cloud-watch-logs-archiver';
new DailyCloudWatchLogsArchiver(stack, 'DailyCloudWatchLogsArchiver', {
schedules: [
{
name: 'example-log-archive-1st-rule',
description: 'example log archive 1st rule.',
target: {
logGroupName: 'example-log-1st-group', // always created CloudWatch Log group
destinationPrefix: 'example-1st-log',
},
},
{
name: 'example-log-archive-2nd-rule',
description: 'example log archive 2nd rule.',
target: {
logGroupName: 'example-log-2nd-group',
destinationPrefix: 'example-2nd-log',
},
},
],
});
License
This project is licensed under the Apache-2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for gammarer.aws-daily-cloud-watch-logs-archiver-0.11.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f7becee8fdbb2aecd7c0d2ec0bcb8d5834924002bac19f136433edb52b80429 |
|
MD5 | 30d12e2d552637e1c962cffcf7408352 |
|
BLAKE2b-256 | 7713cd0018b1e14eb864686174779ef6ca8127fc689de543e3d19b927a23b8c3 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.11.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d0594c7add92c7936cbbfc9be68c9ef3e1584e20115d2ef25ada535f2eb934b |
|
MD5 | 25ebf4bc2bb86ebea56ccd8f5ad24f9f |
|
BLAKE2b-256 | 6092d8563f307ad8ef4c31cd1b8655d6dd0fd440ff7a765e0ae66a8b664b8b2b |