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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c87f01dd2975cf5023d80dd33b0a1051daf1adf92d75052a319bfba5600bddf |
|
MD5 | 018e3c105fd81c31e174bce6eedde8ef |
|
BLAKE2b-256 | e320d02b675cec26713fbcab0152cdeb2c5af68560c13a596fadf218ba042ac8 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.11.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f28303834c305f0913b028809c2e95135cb1d7d876095b4a10852b044b55c235 |
|
MD5 | 24c2958c4503bb8dfc5fe068b1e475f5 |
|
BLAKE2b-256 | 4acbf80fe11c7a0e902d406c7817b4e16992cbcbae29ded28ef57577448a48aa |