Skip to content
v2.274.0

Experimental

@aws-cdk/aws-pipes-targets-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

CloudWatchLogsTargetParameters Struct ​

CloudWatch Logs target properties.

Example ​

ts
declare const sourceQueue: sqs.Queue;
declare const targetLogGroup: logs.LogGroup;

const logGroupTarget = new targets.CloudWatchLogsTarget(targetLogGroup, {
  inputTransformation: pipes.InputTransformation.fromObject({ body: "👀" }),
});

const pipe = new pipes.Pipe(this, 'Pipe', {
    source: new SqsSource(sourceQueue),
    target: logGroupTarget,
});

Properties ​

inputTransformationoptionalIInputTransformationinput_transformationoptionalIInputTransformationinputTransformationoptionalIInputTransformationInputTransformationoptionalIInputTransformationInputTransformationoptionalIInputTransformation= none#
The input transformation to apply to the message before sending it to the target.
logStreamNameoptionalstringlog_stream_nameoptionalstrlogStreamNameoptionalStringLogStreamNameoptionalstringLogStreamNameoptional*string= none#
The name of the log stream.
timestampoptionalstringtimestampoptionalstrtimestampoptionalStringTimestampoptionalstringTimestampoptional*string#
The JSON path expression that references the timestamp in the payload.

Default: current time

This is the time that the event occurred, as a JSON path expression in the payload.

example
ts
'$.data.timestamp'