Skip to main content

AWS CloudWatch Logs daily archive to s3 bucket

Project description

AWS Daily CloudWatch Logs Archiver

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-archiver
# or
yarn add @gammarer/aws-daily-cloud-watch-logs-archiver

Python

pip install gammarer.aws-daily-cloud-watch-logs-archiver

C# / .NET

dotnet add package Gammarer.CDK.AWS.DailyCloudWatchLogsArchiver

Java

Add the following to pom.xml:

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

Example

npm install @gammarer/aws-daily-cloud-watch-logs-archiver
import { DailyCloudWatchLogsArchiver } from '@gammarer/aws-daily-cloud-watch-logs-archiver';

new DailyCloudWatchLogsArchiver(stack, 'DailyCloudWatchLogsArchiver', {
    resource: {
      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-archiver-2.2.6.tar.gz.

File metadata

File hashes

Hashes for gammarer.aws-daily-cloud-watch-logs-archiver-2.2.6.tar.gz
Algorithm Hash digest
SHA256 0082bc641d45bb2b728e1b29cbf9ff979eaa645be251c88b0155ccae59215607
MD5 1f4d8c26b7451d8c158c84fa36f4f044
BLAKE2b-256 43caadb4358f7b094b26d4a57537de28dbaacfa37a9a8d98c84621e57b4fe55f

See more details on using hashes here.

File details

Details for the file gammarer.aws_daily_cloud_watch_logs_archiver-2.2.6-py3-none-any.whl.

File metadata

File hashes

Hashes for gammarer.aws_daily_cloud_watch_logs_archiver-2.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c6a83482b995e0346d45aa427b55883a0fd694929abcc9c9c9e3c3cd84c903b9
MD5 cf4692aa30e63f13271f742f1ffddb51
BLAKE2b-256 3dec583b0dbf0b8445bfcabd4577ac05a4cf91816ffeffc800d52d746b219696

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