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.13.17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38781f1aa37934be3b9c207b8360c33b6e0c68056cdbc7249b1df4b8caee669b |
|
MD5 | e3c25626b3c6d2c837fb58ffe61b7a94 |
|
BLAKE2b-256 | 6519c0a4aa76c739f85e5d30ae72588bdb35a1b288280bdf850b218d03ad3f81 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.13.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 416b5d3e5e79cb8dd2afa9b3bdad1786311a2af2c4c35595fc0bbf86d2538526 |
|
MD5 | 6fb7133b5b779101a75d68558c24f51c |
|
BLAKE2b-256 | e4ebb4b46892c657e66eedb0ea80fa0e8a68d0d1179da5b07238851219e7d1d7 |