Skip to content

RecordingConfiguration

Source: src/AWS/IVS/RecordingConfiguration.ts

An Amazon IVS recording configuration, enabling automatic recording of live broadcasts to Amazon S3.

Attach the configuration to a channel via the channel’s recordingConfigurationArn prop; every broadcast on that channel is then archived to the configured bucket. Recording configurations are immutable — any settings change replaces the resource.

Record a Channel to S3

import * as AWS from "alchemy/AWS";
import * as IVS from "alchemy/AWS/IVS";
const archive = yield* AWS.Bucket("StreamArchive");
const recording = yield* IVS.RecordingConfiguration("Recording", {
destinationConfiguration: { s3: { bucketName: archive.bucketName } },
});
const channel = yield* IVS.Channel("LiveChannel", {
recordingConfigurationArn: recording.recordingConfigurationArn,
});

Merge Reconnects and Record Thumbnails

const recording = yield* IVS.RecordingConfiguration("Recording", {
destinationConfiguration: { s3: { bucketName: archive.bucketName } },
recordingReconnectWindow: "2 minutes",
thumbnailConfiguration: {
recordingMode: "INTERVAL",
targetInterval: "30 seconds",
},
});