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.19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97b17692808fb3e994b298d816b0ee5bbc189b41fb49108769718f8e4625eebb |
|
MD5 | 490a7580a8ab8da5a930d45c8dc1d275 |
|
BLAKE2b-256 | ee201cb1b45f2f6deaf6aca196d1c9473fefa58660cf269b821de327d1acd8c2 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.13.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b44533e8ecbe2bfef9a6573e54e9c70af31d79b06e80601b1615a5c28e191036 |
|
MD5 | 93e15c6b9824f6fde1c1436251f46279 |
|
BLAKE2b-256 | 7eaf826ec50da7ded5740391f346efe3cbb4f1ff2dcbe56c877b3ce6ea2fd6b2 |