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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 232cc56cc4691e98ab21522fc67e9b33ba3837b6ec1b70746d74433ecf996a4a |
|
MD5 | db770566f032dd2389c7cd53b8a1f752 |
|
BLAKE2b-256 | dec2b1c5d1a11fa6f0ba7ec91727cebfd8ef19db7b6c35ad6dfa5fe0b3dbe35d |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad7e8a7ee7b266e1f99f5bfdc0b1af0fd7aea929a98e6d0487ff147ecc3bffc |
|
MD5 | 8d1771dbea51f9aae2677c8fc00568ce |
|
BLAKE2b-256 | 6f77571b26811b4192c0133a8b65edafe9f212bc8dae85e5a2940515e2538bef |