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.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd17084210e6d3b518306e952c8edba67fca44231207f2353d3999a405325325 |
|
MD5 | 1fa8333dc213d505f985bd8a0b30c23f |
|
BLAKE2b-256 | ef21a4d20e9faa1386834f8d948888c8ad2b7c0ac0c5497050474c85c4377190 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.13.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a466adc7be70084669343e2d26af7191a9432f00de87488d278f6ca9a6634ed |
|
MD5 | 24bdf13d47bcbd8036cac1eca8ad90a3 |
|
BLAKE2b-256 | d71a0247f5ea79ac3bc575c86e6782fe5b766d3ff25e42a527a49cf7ecb769e6 |