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.22.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52cfacb9473c7fec23fdf982699f16d28fd1389812b7af68fb5211727b1349b1 |
|
MD5 | a4161daed38db8bf122f944a1074790a |
|
BLAKE2b-256 | 7969b5f998595087ab7925ace1aeeb6be75e640c1818f63f01ed28b0c9be38aa |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.13.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4a5ff0d4f5b4ed9ec81ede35933043a1169d1d1a2306ea45e7ac39cb71518fd |
|
MD5 | ca1bbf16fa4ff34b55e43f777c94ce79 |
|
BLAKE2b-256 | 15105b3f5d26006759ce7b1826c6a997e98ad10ec2c354f0d298d46f5e6cbab8 |