@gcpr28/aws-daily-cloud-watch-log-archiver
v0.0.8
Published
AWS CloudWatch Logs daily archive to s3 bucket
Downloads
107
Maintainers
Readme
AWS Daily CloudWatch Log Archiver
AWS CloudWatch Logs daily(13:00Z) archive to s3 bucket.
Resources
This construct creating resource list.
- S3 Bucket (log-archive-xxxxxxxx from @yicr/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 @yicr/aws-daily-cloud-watch-log-archiver
or
yarn add @yicr/aws-daily-cloud-watch-log-archiver
Example
npm install @yicr/aws-daily-cloud-watch-log-archiver
import { DailyCloudWatchLogArchiver } from '@yicr/aws-daily-cloud-watch-log-archiver';
new DailyCloudWatchLogArchiver(stack, 'DailyCloudWatchLogArchiver', {
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.