Skip to main content
Home

Built and signed on GitHub Actions

LogTape AWS CloudWatch Logs Sink

It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
94%
Published
4 days ago (1.0.4)
interface CloudWatchLogsSinkOptions

Options for configuring the CloudWatch Logs sink.

Properties

readonly
optional
client: CloudWatchLogsClient

An existing CloudWatch Logs client instance. If provided, the client will be used directly and other connection options (region, credentials) will be ignored.

The name of the log group to send log events to.

The name of the log stream within the log group.

readonly
optional
region: string

The AWS region to use when creating a new client. Ignored if client is provided.

readonly
optional
credentials: { readonly accessKeyId: string; readonly secretAccessKey: string; readonly sessionToken?: string; }

AWS credentials to use when creating a new client. Ignored if client is provided. If not provided, the AWS SDK will use default credential resolution.

readonly
optional
batchSize: number

Maximum number of log events to batch before sending to CloudWatch. Must be between 1 and 10,000.

readonly
optional
flushInterval: number

Maximum time in milliseconds to wait before flushing buffered log events. Set to 0 or negative to disable time-based flushing.

readonly
optional
maxRetries: number

Maximum number of retry attempts for failed requests.

readonly
optional
retryDelay: number

Initial delay in milliseconds for exponential backoff retry strategy.

readonly
optional
formatter: TextFormatter

Text formatter to use for formatting log records before sending to CloudWatch Logs. If not provided, defaults to a simple text formatter. Use jsonLinesFormatter() from "@logtape/logtape" for JSON structured logging to enable powerful CloudWatch Logs Insights querying capabilities.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@logtape/cloudwatch-logs

Import symbol

import { type CloudWatchLogsSinkOptions } from "@logtape/cloudwatch-logs";
or

Import directly with a jsr specifier

import { type CloudWatchLogsSinkOptions } from "jsr:@logtape/cloudwatch-logs";

Add Package

pnpm i jsr:@logtape/cloudwatch-logs
or (using pnpm 10.8 or older)
pnpm dlx jsr add @logtape/cloudwatch-logs

Import symbol

import { type CloudWatchLogsSinkOptions } from "@logtape/cloudwatch-logs";

Add Package

yarn add jsr:@logtape/cloudwatch-logs
or (using Yarn 4.8 or older)
yarn dlx jsr add @logtape/cloudwatch-logs

Import symbol

import { type CloudWatchLogsSinkOptions } from "@logtape/cloudwatch-logs";

Add Package

vlt install jsr:@logtape/cloudwatch-logs

Import symbol

import { type CloudWatchLogsSinkOptions } from "@logtape/cloudwatch-logs";

Add Package

npx jsr add @logtape/cloudwatch-logs

Import symbol

import { type CloudWatchLogsSinkOptions } from "@logtape/cloudwatch-logs";

Add Package

bunx jsr add @logtape/cloudwatch-logs

Import symbol

import { type CloudWatchLogsSinkOptions } from "@logtape/cloudwatch-logs";