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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53f8e84202a15f25f42aa492bcf33f575a96c637b9d1efa5905365748cfae2ca |
|
MD5 | 1ee1a8d9f4b0932eaf5c80e013cb4806 |
|
BLAKE2b-256 | 09f4fcd41b403ddfc3312e9c933daf0765cbf6f908626ce2b464ed776d8ee231 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.12.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a11afe92a95bd6e7432fc05b8433e8a43f4e1fe2ccdde6cdf89b49d40b9f444 |
|
MD5 | a368eb64d452436a87065d2a8fc44606 |
|
BLAKE2b-256 | 42b4bda3141010a7e9e89427332717b3786b86f37f4b0851c6a37b54c9861a9f |