Skip to content
betterstack-alchemyUnofficial

Telemetry.AwsLogGroupSubscription

Kind ResourceType id BetterStack.Telemetry.AwsLogGroupSubscriptionSource src/Telemetry/AwsLogGroupSubscription.tsLive test available A live lifecycle test exists: it runs against the offline mock by default and against the real API under bun run test:live. This records that the test exists, not a dated live run (see Compatibility). Test file: test/Telemetry/AwsLogGroupSubscription.test.ts.

An override that subscribes a CloudWatch log group to an aws Source, or keeps it unsubscribed (subscribed: false) even when the source subscribes new log groups automatically, before the source has found the group.

sourceId, region and name identify the log group: changing one replaces the override. subscribed changes in place.

Subscribe one log group, keep another out

const aws = yield* BetterStack.Telemetry.Source("aws", { platform: "aws" });
yield* BetterStack.Telemetry.AwsLogGroupSubscription("api-logs", {
sourceId: aws.id,
region: "us-east-1",
name: "/aws/lambda/api",
subscribed: true,
});
yield* BetterStack.Telemetry.AwsLogGroupSubscription("noisy-logs", {
sourceId: aws.id,
region: "us-east-1",
name: "/aws/lambda/noisy",
subscribed: false,
});

name string required

CloudWatch log-group name.

region string required

AWS region of the log group.

sourceId string required

The ID of the aws source. Get it via List sources.

subscribed boolean required

true subscribes the log group. false keeps it unsubscribed, even when automatic subscription is on.

teamId string

Team that owns the resource, such as t123. Defaults to the credentials' team (BETTERSTACK_TEAM_ID, or the profile's team). Changing it replaces the resource.

id string always set

The aws_log_group_subscription's id.

sourceId string always set

The aws source the override belongs to.

createdAt string

When the override was created.

name string

CloudWatch log-group name.

region string

AWS region of the log group.

subscribed boolean

true subscribes the log group. false keeps it unsubscribed, even when automatic subscription is on.

teamId string

Team that owns the source, such as t123.

updatedAt string

When the override was last updated.

AwsLogGroupSubscription.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.

id string required

The override's id.

sourceId string required

The aws source it belongs to.

teamId string

Team that owns the source, such as t123. Defaults to the credentials' team.