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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2b5314bfd3557581992abb2b5843042ef635a0ebdc945d05c5d71c9ab0f5233 |
|
MD5 | 5e99de3a253bbd72281c3d60b9e03688 |
|
BLAKE2b-256 | 78de6e10ad6b2478bd5188c4a812bccc62580b86c08ffd1d0ae2c8b7047a7a8e |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.11.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c46ccde3b10b40e2c33c1546373530d5d69e35d89e7d4c39d87ed4305771c6c |
|
MD5 | 14776d2f6876c49157771ee089d143ef |
|
BLAKE2b-256 | 5c1fb2bf15d5cfce7c7032322d1779a2d758c4bef63ea9fc37d221dffaf48712 |