Skip to main content

Log Group

Manages a Cloud Watch Log Group.

Sample code

exports.createResources = () => [
{
type: "LogGroup",
group: "CloudWatchLogs",
name: "loggroupwithkmskey",
properties: ({}) => ({
retentionInDays: 1,
}),
dependencies: ({}) => ({
kmsKey: "kms-key-aws-hub-and-spoke-demo-test",
}),
},
];

Properties

Full Examples

Dependencies

Used By

List

The log groups can be filtered with the LogGroup type:

gc l -t LogGroup
Listing resources on 1 provider: aws
✓ aws
✓ Initialising
✓ Listing 1/1
┌─────────────────────────────────────────────────────────────────────┐
│ 9 CloudWatchLogs::LogGroup from aws │
├─────────────────────────────────────────────────────────────────────┤
│ name: /aws/ecs/containerinsights/cluster/performance │
│ managedByUs: NO │
│ live: │
│ logGroupName: /aws/ecs/containerinsights/cluster/performance │
│ creationTime: 1629683668515 │
│ retentionInDays: 1 │
│ metricFilterCount: 0 │
│ arn: arn:aws:logs:eu-west-2:840541460064:log-group:/aws/ecs/cont… │
│ storedBytes: 0 │
│ │
├─────────────────────────────────────────────────────────────────────┤
│ name: my-loggroup │
│ managedByUs: NO │
│ live: │
│ logGroupName: my-loggroup │
│ creationTime: 1632310599029 │
│ metricFilterCount: 0 │
│ arn: arn:aws:logs:eu-west-2:840541460064:log-group:my-loggroup:* │
│ storedBytes: 0 │
│ │
└─────────────────────────────────────────────────────────────────────┘


List Summary:
Provider: aws
┌────────────────────────────────────────────────────────────────────┐
│ aws │
├──────────────────────────┬─────────────────────────────────────────┤
│ CloudWatchLogs::LogGroup │ /aws/ecs/containerinsights/cluster/per… │
│ │ my-loggroup │
└──────────────────────────┴─────────────────────────────────────────┘
2 resources, 1 type, 1 provider
Command "gc l -t LogGroup" executed in 2s