AWS.MediaLive reference
BatchUpdateSchedule
Section titled “BatchUpdateSchedule”Source:
packages/aws/src/MediaLive/BatchUpdateSchedule.ts
Runtime binding for medialive:BatchUpdateSchedule.
Adds and/or removes schedule actions on the bound Channel — ad
breaks (SCTE-35 splices), input switches, static image overlays, pause
states — the primary data-plane API for driving a live broadcast (e.g.
a playout-automation Lambda that switches inputs on a timecode). The
channel id is injected from the binding. Provide the implementation
with Effect.provide(AWS.MediaLive.BatchUpdateScheduleHttp).
BatchUpdateSchedule: Driving the Channel Schedule
Section titled “BatchUpdateSchedule: Driving the Channel Schedule”// init — bind the operation to the channelconst updateSchedule = yield* AWS.MediaLive.BatchUpdateSchedule(channel);
// runtimeyield* updateSchedule({ Creates: { ScheduleActions: [ { ActionName: "switch-to-backup", ScheduleActionStartSettings: { FixedModeScheduleActionStartSettings: { Time: "2026-01-01T00:00:00.000Z", }, }, ScheduleActionSettings: { InputSwitchSettings: { InputAttachmentNameReference: "backup" }, }, }, ], },});Channel
Section titled “Channel”Source:
packages/aws/src/MediaLive/Channel.ts
An AWS Elemental MediaLive channel — the live encoder that reads from attached inputs, transcodes per its encoder settings, and writes to output destinations (HLS, RTMP, MediaPackage, …).
Channels bill per running hour; Alchemy provisions channels in the IDLE
state and never starts them — start/stop is a runtime operation.
Channel: Creating a Channel
Section titled “Channel: Creating a Channel”Single-pipeline HLS channel
const channel = yield* MediaLive.Channel("Live", { channelClass: "SINGLE_PIPELINE", roleArn: role.roleArn, inputAttachments: [ { InputId: input.inputId, InputAttachmentName: "primary" }, ], inputSpecification: { Codec: "AVC", Resolution: "SD", MaximumBitrate: "MAX_10_MBPS", }, destinations, encoderSettings,});IAM role for MediaLive
const role = yield* IAM.Role("MediaLiveRole", { assumeRolePolicyDocument: { Version: "2012-10-17", Statement: [ { Effect: "Allow", Principal: { Service: "medialive.amazonaws.com" }, Action: ["sts:AssumeRole"], }, ], },});Channel: Looking up an existing channel
Section titled “Channel: Looking up an existing channel”Channel.lookup references a channel Alchemy doesn’t manage (created in the
console or by another stack), found by channelId or name. It is read during
plan/deploy and never created, updated or deleted.
const live = AWS.MediaLive.Channel.lookup({ name: "live" });DeleteSchedule
Section titled “DeleteSchedule”Source:
packages/aws/src/MediaLive/DeleteSchedule.ts
Runtime binding for medialive:DeleteSchedule.
Clears every scheduled action from the bound Channel’s schedule
in one call — the reset lever a playout-automation Lambda pulls before
programming a fresh broadcast rundown with BatchUpdateSchedule.
The channel id is injected from the binding. Provide the implementation
with Effect.provide(AWS.MediaLive.DeleteScheduleHttp).
DeleteSchedule: Driving the Channel Schedule
Section titled “DeleteSchedule: Driving the Channel Schedule”// init — bind the operation to the channelconst deleteSchedule = yield* AWS.MediaLive.DeleteSchedule(channel);
// runtimeyield* deleteSchedule();DescribeChannel
Section titled “DescribeChannel”Source:
packages/aws/src/MediaLive/DescribeChannel.ts
Runtime binding for medialive:DescribeChannel.
Reads the bound Channel’s live state — lifecycle state
(IDLE/RUNNING), pipeline details, egress endpoints, and attached
inputs — e.g. for an operations dashboard or a scheduler that only
starts a channel that is not already running. The channel id is
injected from the binding. Provide the implementation with
Effect.provide(AWS.MediaLive.DescribeChannelHttp).
DescribeChannel: Observing Channels
Section titled “DescribeChannel: Observing Channels”// init — bind the operation to the channelconst describeChannel = yield* AWS.MediaLive.DescribeChannel(channel);
// runtimeconst { State } = yield* describeChannel();const running = State === "RUNNING";DescribeInput
Section titled “DescribeInput”Source:
packages/aws/src/MediaLive/DescribeInput.ts
Runtime binding for medialive:DescribeInput.
Reads the bound Input’s live state — attachment state
(DETACHED/ATTACHED), resolved push ingest URLs, sources, and
security groups — e.g. so a stream-key service can hand a contributor
the RTMP endpoint to push to. The input id is injected from the
binding. Provide the implementation with
Effect.provide(AWS.MediaLive.DescribeInputHttp).
DescribeInput: Observing Inputs
Section titled “DescribeInput: Observing Inputs”// init — bind the operation to the inputconst describeInput = yield* AWS.MediaLive.DescribeInput(input);
// runtimeconst { Destinations } = yield* describeInput();const ingestUrl = Destinations?.[0]?.Url;DescribeSchedule
Section titled “DescribeSchedule”Source:
packages/aws/src/MediaLive/DescribeSchedule.ts
Runtime binding for medialive:DescribeSchedule.
Reads the bound Channel’s schedule — the queue of pending and
recent actions created with BatchUpdateSchedule (one page per
call; pass NextToken from the previous response to continue) — e.g.
so a playout dashboard can show upcoming input switches and ad breaks.
The channel id is injected from the binding. Provide the implementation
with Effect.provide(AWS.MediaLive.DescribeScheduleHttp).
DescribeSchedule: Driving the Channel Schedule
Section titled “DescribeSchedule: Driving the Channel Schedule”// init — bind the operation to the channelconst describeSchedule = yield* AWS.MediaLive.DescribeSchedule(channel);
// runtimeconst { ScheduleActions } = yield* describeSchedule();DescribeThumbnails
Section titled “DescribeThumbnails”Source:
packages/aws/src/MediaLive/DescribeThumbnails.ts
Runtime binding for medialive:DescribeThumbnails.
Fetches the latest preview thumbnail (base64 JPEG) from a pipeline of
the bound RUNNING Channel — e.g. a confidence-monitoring
dashboard that renders a live snapshot of what the channel is encoding.
Requires thumbnails to be enabled in the channel’s encoder settings; a
channel that is not running answers with the typed
BadRequestException tag. The channel id is injected from the binding.
Provide the implementation with
Effect.provide(AWS.MediaLive.DescribeThumbnailsHttp).
DescribeThumbnails: Observing Channels
Section titled “DescribeThumbnails: Observing Channels”// init — bind the operation to the channelconst describeThumbnails = yield* AWS.MediaLive.DescribeThumbnails(channel);
// runtimeconst { ThumbnailDetails } = yield* describeThumbnails({ PipelineId: "0", ThumbnailType: "CURRENT_ACTIVE",});Source:
packages/aws/src/MediaLive/Input.ts
An AWS Elemental MediaLive input — the ingest endpoint or source locator a channel reads live content from (RTMP/RTP push, HLS/MP4 pull, MediaConnect flow, …).
Input: Creating Inputs
Section titled “Input: Creating Inputs”RTMP push input behind an allowlist
const isg = yield* MediaLive.InputSecurityGroup("Allowlist", { whitelistRules: ["0.0.0.0/0"],});const input = yield* MediaLive.Input("Stream", { type: "RTMP_PUSH", inputSecurityGroups: [isg.inputSecurityGroupId], destinations: [{ StreamName: "live/stream" }],});HLS pull input
const input = yield* MediaLive.Input("Vod", { type: "URL_PULL", sources: [{ Url: "https://example.com/stream/index.m3u8" }],});Input: Attaching to a Channel
Section titled “Input: Attaching to a Channel”const channel = yield* MediaLive.Channel("Live", { roleArn: role.roleArn, inputAttachments: [ { InputId: input.inputId, InputAttachmentName: "primary" }, ], encoderSettings, destinations,});Input: Looking up an existing input
Section titled “Input: Looking up an existing input”Input.lookup references an input Alchemy doesn’t manage (created in the
console or by another stack), found by inputId or name. It is read during
plan/deploy and never created, updated or deleted.
const camera = AWS.MediaLive.Input.lookup({ name: "camera-1" });InputSecurityGroup
Section titled “InputSecurityGroup”Source:
packages/aws/src/MediaLive/InputSecurityGroup.ts
An AWS Elemental MediaLive input security group — an IP allowlist that gates which source networks may push content to attached PUSH inputs (RTMP_PUSH, RTP_PUSH, UDP_PUSH).
InputSecurityGroup: Creating an Input Security Group
Section titled “InputSecurityGroup: Creating an Input Security Group”Allow a single network
const isg = yield* MediaLive.InputSecurityGroup("Allowlist", { whitelistRules: ["10.0.0.0/16"],});Open to the world (test-only)
const isg = yield* MediaLive.InputSecurityGroup("Open", { whitelistRules: ["0.0.0.0/0"], tags: { team: "media" },});InputSecurityGroup: Attaching to an Input
Section titled “InputSecurityGroup: Attaching to an Input”const input = yield* MediaLive.Input("Stream", { type: "RTMP_PUSH", inputSecurityGroups: [isg.inputSecurityGroupId], destinations: [{ StreamName: "live/stream" }],});InputSecurityGroup: Looking up an existing input security group
Section titled “InputSecurityGroup: Looking up an existing input security group”InputSecurityGroup.lookup references an input security group Alchemy doesn’t manage (created in the
console or by another stack), found by inputSecurityGroupId. It is read during
plan/deploy and never created, updated or deleted.
const studio = AWS.MediaLive.InputSecurityGroup.lookup({ inputSecurityGroupId: "123456" });ListAlerts
Section titled “ListAlerts”Source:
packages/aws/src/MediaLive/ListAlerts.ts
Runtime binding for medialive:ListAlerts.
Lists the bound Channel’s alerts — SET and CLEARED error
conditions such as a lost input or a failed output (one page per call;
pass NextToken from the previous response to continue). Filter with
StateFilter: "SET" to see only active problems — e.g. a health-check
Lambda that pages an operator while any alert is SET. The channel id is
injected from the binding. Provide the implementation with
Effect.provide(AWS.MediaLive.ListAlertsHttp).
ListAlerts: Observing Channels
Section titled “ListAlerts: Observing Channels”// init — bind the operation to the channelconst listAlerts = yield* AWS.MediaLive.ListAlerts(channel);
// runtimeconst { Alerts } = yield* listAlerts({ StateFilter: "SET" });ListChannels
Section titled “ListChannels”Source:
packages/aws/src/MediaLive/ListChannels.ts
Runtime binding for medialive:ListChannels.
Enumerates the account’s MediaLive channels (one page per call — pass
NextToken from the previous response to continue) — e.g. a cost
sentinel that finds channels left RUNNING outside broadcast hours.
Account-level: the deploy-time grant is medialive:ListChannels on
*. Provide the implementation with
Effect.provide(AWS.MediaLive.ListChannelsHttp).
ListChannels: Observing Channels
Section titled “ListChannels: Observing Channels”// init — bind the account-level operationconst listChannels = yield* AWS.MediaLive.ListChannels();
// runtimeconst { Channels } = yield* listChannels({ MaxResults: 20 });const running = (Channels ?? []).filter((c) => c.State === "RUNNING");ListInputs
Section titled “ListInputs”Source:
packages/aws/src/MediaLive/ListInputs.ts
Runtime binding for medialive:ListInputs.
Enumerates the account’s MediaLive inputs (one page per call — pass
NextToken from the previous response to continue) — e.g. an
inventory endpoint that maps ingest endpoints to the channels they
feed. Account-level: the deploy-time grant is medialive:ListInputs
on *. Provide the implementation with
Effect.provide(AWS.MediaLive.ListInputsHttp).
ListInputs: Observing Inputs
Section titled “ListInputs: Observing Inputs”// init — bind the account-level operationconst listInputs = yield* AWS.MediaLive.ListInputs();
// runtimeconst { Inputs } = yield* listInputs({ MaxResults: 20 });const attached = (Inputs ?? []).filter((i) => i.State === "ATTACHED");RestartChannelPipelines
Section titled “RestartChannelPipelines”Source:
packages/aws/src/MediaLive/RestartChannelPipelines.ts
Runtime binding for medialive:RestartChannelPipelines.
Restarts one or both encoder pipelines of the bound RUNNING
Channel without a full stop/start cycle — the standard remedy
for a wedged pipeline (frozen output, persistent alert) that an
automated-recovery Lambda applies when a channel alert fires. The
channel id is injected from the binding. Provide the implementation
with Effect.provide(AWS.MediaLive.RestartChannelPipelinesHttp).
RestartChannelPipelines: Controlling Channels
Section titled “RestartChannelPipelines: Controlling Channels”// init — bind the operation to the channelconst restartPipelines = yield* AWS.MediaLive.RestartChannelPipelines(channel);
// runtimeyield* restartPipelines({ PipelineIds: ["PIPELINE_0"] });StartChannel
Section titled “StartChannel”Source:
packages/aws/src/MediaLive/StartChannel.ts
Runtime binding for medialive:StartChannel.
Starts the bound Channel, transitioning it from IDLE through
STARTING to RUNNING. A RUNNING channel encodes and bills hourly —
pair with StopChannel to control encoding cost (e.g. a
scheduler Lambda that runs the channel only during broadcast windows).
The channel id is injected from the binding. Provide the implementation
with Effect.provide(AWS.MediaLive.StartChannelHttp).
StartChannel: Controlling Channels
Section titled “StartChannel: Controlling Channels”// init — bind the operation to the channelconst startChannel = yield* AWS.MediaLive.StartChannel(channel);
// runtimeconst { State } = yield* startChannel();StopChannel
Section titled “StopChannel”Source:
packages/aws/src/MediaLive/StopChannel.ts
Runtime binding for medialive:StopChannel.
Stops the bound Channel, transitioning it from RUNNING
through STOPPING back to IDLE — the other half of a broadcast-window
scheduler built on StartChannel. Stopping a channel that is not
running fails with the typed ConflictException tag. The channel id is
injected from the binding. Provide the implementation with
Effect.provide(AWS.MediaLive.StopChannelHttp).
StopChannel: Controlling Channels
Section titled “StopChannel: Controlling Channels”// init — bind the operation to the channelconst stopChannel = yield* AWS.MediaLive.StopChannel(channel);
// runtimeconst { State } = yield* stopChannel();