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-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fcd479964fb25c85431d143614094c3bbc60eef95355e6d754b8738a1712359 |
|
MD5 | 70945fbefe1ec9a51ef887d2cf5f0615 |
|
BLAKE2b-256 | 60255971ec20a1c63f76a6abd848801c312d2afbce4113cdd22af1b6dbcdb9ad |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7af1a94897682352614d543a1c3e3991d8dee0683afcdbaa47860f83cdb65601 |
|
MD5 | 1f09921a2cff4c0de5ec28c771706d01 |
|
BLAKE2b-256 | eadfbf751bef162bf0f4ca0efa786d041a267e6fa6e2ced665670834e3d2c66c |