Skip to content

LoggingConfiguration

Source: src/AWS/IVSChat/LoggingConfiguration.ts

An Amazon IVS Chat logging configuration — records the chat messages of the rooms it is attached to into S3, CloudWatch Logs, or a Kinesis Data Firehose delivery stream.

CloudWatch Logs Destination

import * as IVSChat from "alchemy/AWS/IVSChat";
import * as Logs from "alchemy/AWS/Logs";
const logGroup = yield* Logs.LogGroup("ChatLogGroup");
const logging = yield* IVSChat.LoggingConfiguration("ChatLogs", {
destinationConfiguration: {
cloudWatchLogs: { logGroupName: logGroup.logGroupName },
},
});

S3 Destination

const logging = yield* IVSChat.LoggingConfiguration("ChatLogs", {
destinationConfiguration: {
s3: { bucketName: bucket.bucketName },
},
});
const room = yield* IVSChat.Room("LiveChat", {
loggingConfigurationIdentifiers: [logging.loggingConfigurationArn],
});