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.12.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29d42872880f0b2a0468ef1d5e0a05e6a8db07d40b9aac80a9a163606b0e3841 |
|
MD5 | aaa8ef627892571b2a7f94c978aa776d |
|
BLAKE2b-256 | df0017132c6ca80af6cda4f1cd283ce2616e50e3e8a1f8f06b12528a8c3b509e |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.12.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10335ff1c3e88ef8b6c53a0809e795ab13388d9803a530e34d7939fbde94421a |
|
MD5 | 9cb0b82909dc51c423085cc0c0734d0f |
|
BLAKE2b-256 | dab60495bc1d9eb07c79e99a0b3eb8459099ebc7035b409baf28bf8a532ac3fa |