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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a17ef0dd8bbe6ed37decf665d6714df1552644e4cc1b0f6223033a84796b2c8 |
|
MD5 | 9e11c33d9f98128c09e7351f2fc0f220 |
|
BLAKE2b-256 | 6690a389b6b8d38ba98a54d8aab51126519b41f87ae96534db57aaa6d2c70ea3 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.13.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0c87e126f1d25f0124a628e46b4798a0508d17e88c0dd528cc519905026c6ab |
|
MD5 | 07e945e295f2958099c4874f2ffbeb10 |
|
BLAKE2b-256 | 9ee17c7b0f9957ed3ad0f4882281ca23dfd32d53a122f9e8da6af82b33d2487b |