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.12.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57fb697c0df9260673253b8e8fa5243ebb68e967086c72da5b6b483b3961394b |
|
MD5 | 741a7727a005fb926414123ebbefe7e3 |
|
BLAKE2b-256 | 94965001f1da207a4511bf0816e976e18d5a8fa336aed3403babf25d046d521c |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.12.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e7d452e72b838d2e7a55f374d8ad1536c3ef5347ed87674d62874937e4cd257 |
|
MD5 | dd94b94328a684532708419c0d4b83c1 |
|
BLAKE2b-256 | 5f17935007b2162a8ef9237f32d4d9083729c9f0452312f5b530b0dc3d059b8e |