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.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c556b766c0454440d79a8a209696cd0a531a2eae99e8ddfaa2ae01373cd0f5f5 |
|
MD5 | 353d89e1066166471b718e4065e3c9a9 |
|
BLAKE2b-256 | 5551bfd931eaa41bb6cee99b6d86777f5e80a9318d809466fe1571d190c4b4df |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.11.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 019f7edce34cf03d3f72efece8a45400fa0ecc803fa7879c871722750287b047 |
|
MD5 | 0cc5a458949e41aef1be2dc98469c3d7 |
|
BLAKE2b-256 | 35d05d989dc0472e3c2e26776fd0f4861877797749451022a068168bcaebea11 |