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.13.24.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a576b31eb4e77eb7ba68d04a6714a14f22fdf4deb4a83303ca17b10b450d3055 |
|
MD5 | d78a86b627419e156725beb4fe4b983d |
|
BLAKE2b-256 | bb60519240d31072dc33f042b548b70873d1fdce88ae9d8f7bdaa1f3f01a5c00 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.13.24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1568b7e71b63eac6718e4356d3eb8987552abebbcc1d45b8ee531fad169d574e |
|
MD5 | 224974973a26e8420e55b592bfb21e64 |
|
BLAKE2b-256 | 25cfcc0a5910ce15422dbd67540b0c007dbd96bb96db519e497f4d5fe1449436 |