Skip to main content

AWS CloudWatch Logs daily archive to s3 bucket

Project description

AWS Daily CloudWatch Logs Archive Stack

GitHub npm (scoped) PyPI Nuget Sonatype Nexus (Releases) GitHub Workflow Status (branch) GitHub release (latest SemVer)

View on Construct Hub

AWS CloudWatch Logs daily(13:00Z) archive to s3 bucket.

Resources

This construct creating resource list.

  • S3 Bucket (log-archive-xxxxxxxx from @gammarer/aws-secure-log-bucket)
  • Lambda function execution role
  • Lambda function
  • Lambda function log group
  • StepFunctions state machine execution role
  • StepFunctions state machine
  • EventBridge Scheduler execution role
  • EventBridge Scheduler

Architecture

architecture

Install

TypeScript

npm install @gammarer/aws-daily-cloud-watch-logs-archive-stack
# or
yarn add @gammarer/aws-daily-cloud-watch-logs-archive-stack

Python

pip install gammarer.aws-daily-cloud-watch-logs-archive-stack

C# / .NET

dotnet add package Gammarer.CDK.AWS.DailyCloudWatchLogsArchiveStack

Java

Add the following to pom.xml:

<dependency>
  <groupId>com.gammarer</groupId>
  <artifactId>aws-daily-cloud-watch-logs-archive-stack</artifactId>
</dependency>

Example

npm install @gammarer/aws-daily-cloud-watch-logs-archive-stack
import { DailyCloudWatchLogsArchiveStack } from '@gammarer/aws-daily-cloud-watch-logs-archive-stack';

new DailyCloudWatchLogsArchiveStack(stack, 'DailyCloudWatchLogsArchiveStack', {
    targetResourceTag: {
      key: 'DailyLogExport',
      values: ['Yes'],
    },
});

Otherwise

If you want to export old log files, please refer to the following repository. The log file will be exported in the same output format.

AWS CloudWatch Logs Exporter

License

This project is licensed under the Apache-2.0 License.

Project details


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

File details

Details for the file gammarer.aws-daily-cloud-watch-logs-archive-stack-2.6.7.tar.gz.

File metadata

File hashes

Hashes for gammarer.aws-daily-cloud-watch-logs-archive-stack-2.6.7.tar.gz
Algorithm Hash digest
SHA256 c8ca9dd943ddcf866cd11f3288f5fcca7b807da63e4e17abf4b42f7398847d8b
MD5 58dba82d52abd9e8b0ca359e0e373bb9
BLAKE2b-256 0a61d8b7b29fdcbb2a209c635879c6bd5a0117c9026dfa135a61b44eab8a476f

See more details on using hashes here.

File details

Details for the file gammarer.aws_daily_cloud_watch_logs_archive_stack-2.6.7-py3-none-any.whl.

File metadata

File hashes

Hashes for gammarer.aws_daily_cloud_watch_logs_archive_stack-2.6.7-py3-none-any.whl
Algorithm Hash digest
SHA256 99b4fa0f355d6e30526227efec5b5ef4e62b80aa4daa0071fb9dd22ab980903b
MD5 9a2d84961ee926924a72ae75f91821b2
BLAKE2b-256 2eb45c6891e437555f2c045d5b66721c6fa8f9e3eb637220f4120e03b11e74ca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page