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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ff9b9cdac36c37e487bb50273c37fc73a2ec50f6dc872d74caa8c3598050ad5 |
|
MD5 | f38c6a0ef172ca9121cdada713d2b44d |
|
BLAKE2b-256 | e2caa5934a355a4ee672bfd8431aa71497b20d998a2f159e2b383888fdc322ec |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.13.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae6deac231c643affaee37608a43e028d7312aa2b3f87839a9a7063f5010697e |
|
MD5 | f6be99cf8a6540159a3afa02891b8aa8 |
|
BLAKE2b-256 | 6c8e3ed2aa5671a8945f40aeea1fd178c3650daa83eb39e9cedba417d5de2129 |