AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Logs::LogStream

CfnLogStream

The `AWS::Logs::LogStream` resource specifies an Amazon CloudWatch Logs log stream in a specific log group. A log stream represents the sequence of events coming from an application instance or resource that you are monitoring. There is no limit on the number of log streams that you can create for a log group. You must use the following guidelines when naming a log stream: - Log stream names must be unique within the log group. - Log stream names can be between 1 and 512 characters long. - The ':' (colon) and '*' (asterisk) characters are not allowed.

Import

import { CfnLogStream } from 'aws-cdk-lib/aws-logs';

Or use the module namespace:

import * as logs from 'aws-cdk-lib/aws-logs';
// logs.CfnLogStream

Properties

Configuration passed to the constructor as CfnLogStreamProps.

logGroupNameRequired
string | ILogGroupRef

The name of the log group where the log stream is created.

logStreamNameOptional
string

The name of the log stream. The name must be unique within the log group.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter