0.0.23 • Published 1 month ago

patch-log-groups-multi-region v0.0.23

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Patch Log Groups Multi Region

CDK construct to set log retention on CloudWatch log groups over multiple AWS regions. Usefull to fullfill compliance requirements also for dynamically generated log groups worldwide (e.g. by Lambda@Edge).

architecture diagram

Getting started

Installation

npm:

npm install --save patch-log-group-multi-region

yarn:

yarn add patch-log-group-multi-region

Usage

Add the construct to your stack like in the following example:

new PatchLogGroups(stack, "PatchLogGroups", {
  regions: ["eu-west-1", "eu-central-1"],
  schedule: aws_events.Schedule.cron({
    minute: "0",
    hour: "0",
  }),
});

Additional configuration options

new PatchLogGroups(stack, "PatchLogGroups", {
  regions: ["eu-west-1", "eu-central-1"], // List of AWS regions in which the function should run
  schedule: aws_events.Schedule.cron({ minute: "0", hour: "0" }), // Schedule event for the event rule
  retentionInDays: 30, // Number of days to which log retention should be set.
  logGroupNamePrefix: "aws/lambda", // Prefix for log group names that should be effected.
  logsResources: [
    "arn:aws:logs:eu-west-1:0123456789:log-group:*:*",
    "arn:aws:logs:eu-central-1:0123456789:log-group:*:*",
  ], // Resource ARNs to add to the Lambda execution role policy statement.
});
0.0.23

1 month ago

0.0.22

2 months ago

0.0.21

3 months ago

0.0.20

4 months ago

0.0.19

6 months ago

0.0.10

11 months ago

0.0.11

11 months ago

0.0.12

11 months ago

0.0.13

11 months ago

0.0.14

10 months ago

0.0.15

10 months ago

0.0.9

11 months ago

0.0.16

10 months ago

0.0.8

11 months ago

0.0.17

9 months ago

0.0.18

9 months ago

0.0.5

11 months ago

0.0.4

12 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago