# LogStreamProps

Properties for a LogStream.

Extends: LogStreamProps
Used as props by: LogStream

- Source: [`aws-logs/lib/log-stream.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-logs/lib/log-stream.ts#L39)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_logs as logs } from 'aws-cdk-lib';
import { aws_logs as interfaces_logs } from 'aws-cdk-lib/interfaces';

declare const logGroupRef: interfaces_logs.ILogGroupRef;
const logStreamProps: logs.LogStreamProps = {
  logGroup: logGroupRef,

  // the properties below are optional
  logStreamName: 'logStreamName',
  removalPolicy: cdk.RemovalPolicy.DESTROY,
};
```

## Properties

- `logGroup`: [ILogGroupRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_logs.ILogGroupRef.html) (required) — The log group to create a log stream for.

- `logStreamName`: string — The name of the log stream to create.

  **Default:** Automatically generated

  The name must be unique within the log group.

- `removalPolicy`: [RemovalPolicy](/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.Retain — Determine what happens when the log stream resource is removed from the app.

  Normally you want to retain the log stream so you can diagnose issues from
  logs even after a deployment that no longer includes the log stream.

  The date-based retention policy of your log group will age out the logs
  after a certain time.
