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.11.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 866ede2aed8e005864550311467bbc9d57ba9d3b33c97add7b5b3f9fc25b8ea7 |
|
MD5 | d1d741087827ab4be223895029c08ca3 |
|
BLAKE2b-256 | df6de4816be7b5b045d89410268f18a19dd8a0393b517599056e4c2c485eb0be |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.11.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2299f4bda3daf765ffb806a3b3bc43674ba4f1fa9dd2c12777788e4bb2200910 |
|
MD5 | b18878e4c9798edbd4308d3835f78024 |
|
BLAKE2b-256 | 11fb408bcdad8a18fee6c81a18608d809ff2e2e90cc3f54bfce6f7b19beddab4 |