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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4837af7733b375d06c255c2c354c0c7dee30ea96d638b70a8a1a7a832177f972 |
|
MD5 | c23080ddf61fa376d64879226b206f42 |
|
BLAKE2b-256 | 77f616eb75a3aed7e28f7cf6ad6b05de4d6a71b497118c7edd21e771292c69e1 |
Close
Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-0.12.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7463e6fbeb802c3593e182524c331714d201fa52108cb09fd085fb1d4aa827a0 |
|
MD5 | 4aae1f03ab899fe175b4b48d68938b17 |
|
BLAKE2b-256 | 49c9f1ca14fd09a0117992e08b8199e30e793fb16514e813e575b5bd92365509 |