Skip to content

ApplicationCloudWatchLoggingOption

Source: src/AWS/KinesisAnalyticsV2/ApplicationCloudWatchLoggingOption.ts

Attaches an Amazon CloudWatch Logs log stream to a Managed Service for Apache Flink application so application messages (errors, job lifecycle events) are delivered to CloudWatch.

The option is identified by the log stream it delivers to — changing either the application or the log stream replaces the option. The application’s service execution role must be allowed to call logs:PutLogEvents / logs:DescribeLogStreams (the role auto-created by Application already is).

import * as AWS from "alchemy/AWS";
const logGroup = yield* AWS.Logs.LogGroup("FlinkLogs");
const logStream = yield* AWS.Logs.LogStream("FlinkLogStream", {
logGroupName: logGroup.logGroupName,
});
const logging = yield* AWS.KinesisAnalyticsV2.ApplicationCloudWatchLoggingOption(
"AppLogging",
{
applicationName: app.applicationName,
logStreamArn: logStream.logStreamArn.as<string>(),
},
);