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.21.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7898f7d9e5171ffe993637d20b658ed86c3c5b67dfe18f8bbd9120cf210136d |
|
MD5 | 1bfb1b7b4e5a7db8bb02e1201d90922e |
|
BLAKE2b-256 | 9a94c838b33ea9fe2130a610e75211f5039ec15835dc0e39e2f4bb08e82470d0 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.13.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97d77297e86e023de9498969bba54b77c05493306f350d3fb75ce175e7edcec7 |
|
MD5 | da72147dc89d9cf8930fe6d0975861cf |
|
BLAKE2b-256 | a5750a5082d6772eea84304ef170b54b9a498dcfe8e0dfb5ba52643edb05739a |