AWS::MediaConnect Construct Library
Version 2.274.0-alpha.0
Separate package
@aws-cdk/aws-mediaconnect-alpha is not part of aws-cdk-lib — install it separately:
npm install @aws-cdk/aws-mediaconnect-alpha
pip install aws-cdk.aws-mediaconnect-alpha
This module is experimental (alpha): its API may change in any release, without a major version bump.
The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
AWS Elemental MediaConnect
AWS Elemental MediaConnect is a high-quality transport service for live video. It provides the reliability and security of satellite and fiber-optic combined with the flexibility, agility, and economics of IP-based networks. MediaConnect enables you to build mission-critical live video workflows in a fraction of the time and cost of satellite or fiber services.
This package contains constructs for working with AWS Elemental MediaConnect, allowing you to define Flows, Bridges, Gateways, Router Inputs, Router Outputs, and Router Network Interfaces for transporting live video streams.
For further information on AWS Elemental MediaConnect, see the documentation.
Router Resources
MediaConnect routers provide high-performance, low-latency video routing capabilities for building complex live video workflows. Router resources include network interfaces, inputs, and outputs.
How Router Resources Relate
Router resources work together in a pipeline:
- A RouterNetworkInterface defines the network connectivity (public internet or VPC). Required for standard protocol-based inputs and outputs, but not needed when connecting to MediaLive inputs or MediaConnect flows directly.
- A RouterInput is the entry point — it receives video from a source via a protocol (RTP, SRT, RIST), or from a MediaConnect flow.
- A RouterOutput is the exit point — it sends video to a destination via a protocol, to a MediaLive input, or to a MediaConnect flow.
A typical camera-to-cloud workflow looks like:
Camera → RouterNetworkInterface → RouterInput (SRT) → [Router] → RouterOutput (MediaLive) → MediaLive Channel
The router sits in the middle, routing content from inputs to outputs. You can have many outputs per input — for example, one camera feed going to both a MediaLive channel and a MediaConnect flow simultaneously.
End-to-End Example: SRT Source to MediaLive
Here's a complete example showing how to connect an SRT source through a router to MediaLive:
declare const stack: Stack;
declare const mediaLiveInput: medialive.IInput;
// 1. A public network interface for the SRT input
const networkInterface = new RouterNetworkInterface(stack, 'NetworkInterface', {
routerNetworkInterfaceName: 'camera-network',
configuration: RouterNetworkConfiguration.publicNetwork({
cidr: ['203.0.113.0/24'],
}),
});
// 2. A router input receiving SRT from an upstream encoder
const input = new RouterInput(stack, 'Input', {
routerInputName: 'camera-input',
maximumBitrate: Bitrate.mbps(10),
routingScope: RoutingScope.REGIONAL,
tier: RouterInputTier.INPUT_20,
configuration: RouterInputConfiguration.standard({
networkInterface,
protocol: RouterInputProtocol.srtListener({
port: 9000,
minimumLatency: Duration.millis(200),
}),
}),
});
// 3. A router output delivering to MediaLive
const output = new RouterOutput(stack, 'Output', {
routerOutputName: 'medialive-output',
maximumBitrate: Bitrate.mbps(10),
routingScope: RoutingScope.REGIONAL,
tier: RouterOutputTier.OUTPUT_20,
configuration: RouterOutputConfiguration.mediaLiveInput({
input: mediaLiveInput,
pipeline: MediaLivePipeline.PIPELINE_0,
}),
});
# stack: Stack
# media_live_input: medialive.IInput
# 1. A public network interface for the SRT input
network_interface = RouterNetworkInterface(stack, "NetworkInterface",
router_network_interface_name="camera-network",
configuration=RouterNetworkConfiguration.public_network(
cidr=["203.0.113.0/24"]
)
)
# 2. A router input receiving SRT from an upstream encoder
input = RouterInput(stack, "Input",
router_input_name="camera-input",
maximum_bitrate=Bitrate.mbps(10),
routing_scope=RoutingScope.REGIONAL,
tier=RouterInputTier.INPUT_20,
configuration=RouterInputConfiguration.standard(
network_interface=network_interface,
protocol=RouterInputProtocol.srt_listener(
port=9000,
minimum_latency=Duration.millis(200)
)
)
)
# 3. A router output delivering to MediaLive
output = RouterOutput(stack, "Output",
router_output_name="medialive-output",
maximum_bitrate=Bitrate.mbps(10),
routing_scope=RoutingScope.REGIONAL,
tier=RouterOutputTier.OUTPUT_20,
configuration=RouterOutputConfiguration.media_live_input(
input=media_live_input,
pipeline=MediaLivePipeline.PIPELINE_0
)
)
Stack stack;
IInput mediaLiveInput;
// 1. A public network interface for the SRT input
RouterNetworkInterface networkInterface = RouterNetworkInterface.Builder.create(stack, "NetworkInterface")
.routerNetworkInterfaceName("camera-network")
.configuration(RouterNetworkConfiguration.publicNetwork(PublicNetworkConfigurationProps.builder()
.cidr(List.of("203.0.113.0/24"))
.build()))
.build();
// 2. A router input receiving SRT from an upstream encoder
RouterInput input = RouterInput.Builder.create(stack, "Input")
.routerInputName("camera-input")
.maximumBitrate(Bitrate.mbps(10))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterInputTier.INPUT_20)
.configuration(RouterInputConfiguration.standard(StandardConfigurationProps.builder()
.networkInterface(networkInterface)
.protocol(RouterInputProtocol.srtListener(SrtListenerProtocolProps.builder()
.port(9000)
.minimumLatency(Duration.millis(200))
.build()))
.build()))
.build();
// 3. A router output delivering to MediaLive
RouterOutput output = RouterOutput.Builder.create(stack, "Output")
.routerOutputName("medialive-output")
.maximumBitrate(Bitrate.mbps(10))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterOutputTier.OUTPUT_20)
.configuration(RouterOutputConfiguration.mediaLiveInput(MediaLiveInputConnectionProps.builder()
.input(mediaLiveInput)
.pipeline(MediaLivePipeline.PIPELINE_0)
.build()))
.build();
Stack stack;
IInput mediaLiveInput;
// 1. A public network interface for the SRT input
var networkInterface = new RouterNetworkInterface(stack, "NetworkInterface", new RouterNetworkInterfaceProps {
RouterNetworkInterfaceName = "camera-network",
Configuration = RouterNetworkConfiguration.PublicNetwork(new PublicNetworkConfigurationProps {
Cidr = new [] { "203.0.113.0/24" }
})
});
// 2. A router input receiving SRT from an upstream encoder
var input = new RouterInput(stack, "Input", new RouterInputProps {
RouterInputName = "camera-input",
MaximumBitrate = Bitrate.Mbps(10),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterInputTier.INPUT_20,
Configuration = RouterInputConfiguration.Standard(new StandardConfigurationProps {
NetworkInterface = networkInterface,
Protocol = RouterInputProtocol.SrtListener(new SrtListenerProtocolProps {
Port = 9000,
MinimumLatency = Duration.Millis(200)
})
})
});
// 3. A router output delivering to MediaLive
var output = new RouterOutput(stack, "Output", new RouterOutputProps {
RouterOutputName = "medialive-output",
MaximumBitrate = Bitrate.Mbps(10),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterOutputTier.OUTPUT_20,
Configuration = RouterOutputConfiguration.MediaLiveInput(new MediaLiveInputConnectionProps {
Input = mediaLiveInput,
Pipeline = MediaLivePipeline.PIPELINE_0
})
});
var stack Stack
var mediaLiveInput IInput
// 1. A public network interface for the SRT input
networkInterface := awsmediaconnectalpha.NewRouterNetworkInterface(stack, jsii.String("NetworkInterface"), &RouterNetworkInterfaceProps{
RouterNetworkInterfaceName: jsii.String("camera-network"),
Configuration: awsmediaconnectalpha.RouterNetworkConfiguration_PublicNetwork(&PublicNetworkConfigurationProps{
Cidr: []*string{
jsii.String("203.0.113.0/24"),
},
}),
})
// 2. A router input receiving SRT from an upstream encoder
input := awsmediaconnectalpha.NewRouterInput(stack, jsii.String("Input"), &RouterInputProps{
RouterInputName: jsii.String("camera-input"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(10)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterInputTier_INPUT_20(),
Configuration: awsmediaconnectalpha.RouterInputConfiguration_Standard(&StandardConfigurationProps{
NetworkInterface: *NetworkInterface,
Protocol: awsmediaconnectalpha.RouterInputProtocol_SrtListener(&SrtListenerProtocolProps{
Port: jsii.Number(9000),
MinimumLatency: awscdk.Duration_Millis(jsii.Number(200)),
}),
}),
})
// 3. A router output delivering to MediaLive
output := awsmediaconnectalpha.NewRouterOutput(stack, jsii.String("Output"), &RouterOutputProps{
RouterOutputName: jsii.String("medialive-output"),
MaximumBitrate: awscdk.Bitrate_*Mbps(jsii.Number(10)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterOutputTier_OUTPUT_20(),
Configuration: awsmediaconnectalpha.RouterOutputConfiguration_MediaLiveInput(&MediaLiveInputConnectionProps{
Input: mediaLiveInput,
Pipeline: awsmediaconnectalpha.MediaLivePipeline_PIPELINE_0,
}),
})
This gives you a complete pipeline: the encoder pushes SRT to the network interface, the router receives it as an input, and the router output delivers it to MediaLive. For routing rules — including how bitrate affects which outputs can receive which inputs — see the documentation.
Router Network Interfaces
Network interfaces define the network connectivity for router inputs and outputs:
Public Network Interface
declare const stack: Stack;
const publicInterface = new RouterNetworkInterface(stack, 'PublicInterface', {
routerNetworkInterfaceName: 'public-interface',
configuration: RouterNetworkConfiguration.publicNetwork({
cidr: ['203.0.113.0/24'],
}),
});
# stack: Stack
public_interface = RouterNetworkInterface(stack, "PublicInterface",
router_network_interface_name="public-interface",
configuration=RouterNetworkConfiguration.public_network(
cidr=["203.0.113.0/24"]
)
)
Stack stack;
RouterNetworkInterface publicInterface = RouterNetworkInterface.Builder.create(stack, "PublicInterface")
.routerNetworkInterfaceName("public-interface")
.configuration(RouterNetworkConfiguration.publicNetwork(PublicNetworkConfigurationProps.builder()
.cidr(List.of("203.0.113.0/24"))
.build()))
.build();
Stack stack;
var publicInterface = new RouterNetworkInterface(stack, "PublicInterface", new RouterNetworkInterfaceProps {
RouterNetworkInterfaceName = "public-interface",
Configuration = RouterNetworkConfiguration.PublicNetwork(new PublicNetworkConfigurationProps {
Cidr = new [] { "203.0.113.0/24" }
})
});
var stack Stack
publicInterface := awsmediaconnectalpha.NewRouterNetworkInterface(stack, jsii.String("PublicInterface"), &RouterNetworkInterfaceProps{
RouterNetworkInterfaceName: jsii.String("public-interface"),
Configuration: awsmediaconnectalpha.RouterNetworkConfiguration_PublicNetwork(&PublicNetworkConfigurationProps{
Cidr: []*string{
jsii.String("203.0.113.0/24"),
},
}),
})
Private Network Interface
declare const stack: Stack;
declare const securityGroup: ec2.ISecurityGroup;
declare const subnet: ec2.ISubnet;
const privateInterface = new RouterNetworkInterface(stack, 'PrivateInterface', {
routerNetworkInterfaceName: 'private-interface',
configuration: RouterNetworkConfiguration.vpc({
securityGroups: [securityGroup],
subnet: subnet,
}),
});
# stack: Stack
# security_group: ec2.ISecurityGroup
# subnet: ec2.ISubnet
private_interface = RouterNetworkInterface(stack, "PrivateInterface",
router_network_interface_name="private-interface",
configuration=RouterNetworkConfiguration.vpc(
security_groups=[security_group],
subnet=subnet
)
)
Stack stack;
ISecurityGroup securityGroup;
ISubnet subnet;
RouterNetworkInterface privateInterface = RouterNetworkInterface.Builder.create(stack, "PrivateInterface")
.routerNetworkInterfaceName("private-interface")
.configuration(RouterNetworkConfiguration.vpc(VpcNetworkConfigurationProps.builder()
.securityGroups(List.of(securityGroup))
.subnet(subnet)
.build()))
.build();
Stack stack;
ISecurityGroup securityGroup;
ISubnet subnet;
var privateInterface = new RouterNetworkInterface(stack, "PrivateInterface", new RouterNetworkInterfaceProps {
RouterNetworkInterfaceName = "private-interface",
Configuration = RouterNetworkConfiguration.Vpc(new VpcNetworkConfigurationProps {
SecurityGroups = new [] { securityGroup },
Subnet = subnet
})
});
var stack Stack
var securityGroup ISecurityGroup
var subnet ISubnet
privateInterface := awsmediaconnectalpha.NewRouterNetworkInterface(stack, jsii.String("PrivateInterface"), &RouterNetworkInterfaceProps{
RouterNetworkInterfaceName: jsii.String("private-interface"),
Configuration: awsmediaconnectalpha.RouterNetworkConfiguration_Vpc(&VpcNetworkConfigurationProps{
SecurityGroups: []ISecurityGroup{
securityGroup,
},
Subnet: subnet,
}),
})
Router Inputs
Router inputs receive live video streams from various sources and make them available for routing:
Standard Input with RTP Protocol
declare const stack: Stack;
declare const networkInterface: RouterNetworkInterface;
const input = new RouterInput(stack, 'RtpInput', {
routerInputName: 'rtp-input',
maximumBitrate: Bitrate.mbps(10),
routingScope: RoutingScope.REGIONAL,
// tier defaults to RouterInputTier.INPUT_20 (lowest cost)
configuration: RouterInputConfiguration.standard({
networkInterface: networkInterface,
protocol: RouterInputProtocol.rtp({
port: 5000,
}),
}),
});
# stack: Stack
# network_interface: RouterNetworkInterface
input = RouterInput(stack, "RtpInput",
router_input_name="rtp-input",
maximum_bitrate=Bitrate.mbps(10),
routing_scope=RoutingScope.REGIONAL,
# tier defaults to RouterInputTier.INPUT_20 (lowest cost)
configuration=RouterInputConfiguration.standard(
network_interface=network_interface,
protocol=RouterInputProtocol.rtp(
port=5000
)
)
)
Stack stack;
RouterNetworkInterface networkInterface;
RouterInput input = RouterInput.Builder.create(stack, "RtpInput")
.routerInputName("rtp-input")
.maximumBitrate(Bitrate.mbps(10))
.routingScope(RoutingScope.REGIONAL)
// tier defaults to RouterInputTier.INPUT_20 (lowest cost)
.configuration(RouterInputConfiguration.standard(StandardConfigurationProps.builder()
.networkInterface(networkInterface)
.protocol(RouterInputProtocol.rtp(RtpProtocolProps.builder()
.port(5000)
.build()))
.build()))
.build();
Stack stack;
RouterNetworkInterface networkInterface;
var input = new RouterInput(stack, "RtpInput", new RouterInputProps {
RouterInputName = "rtp-input",
MaximumBitrate = Bitrate.Mbps(10),
RoutingScope = RoutingScope.REGIONAL,
// tier defaults to RouterInputTier.INPUT_20 (lowest cost)
Configuration = RouterInputConfiguration.Standard(new StandardConfigurationProps {
NetworkInterface = networkInterface,
Protocol = RouterInputProtocol.Rtp(new RtpProtocolProps {
Port = 5000
})
})
});
var stack Stack
var networkInterface RouterNetworkInterface
input := awsmediaconnectalpha.NewRouterInput(stack, jsii.String("RtpInput"), &RouterInputProps{
RouterInputName: jsii.String("rtp-input"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(10)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
// tier defaults to RouterInputTier.INPUT_20 (lowest cost)
Configuration: awsmediaconnectalpha.RouterInputConfiguration_Standard(&StandardConfigurationProps{
NetworkInterface: networkInterface,
Protocol: awsmediaconnectalpha.RouterInputProtocol_Rtp(&RtpProtocolProps{
Port: jsii.Number(5000),
}),
}),
})
Failover Input Configuration
declare const stack: Stack;
declare const networkInterface: RouterNetworkInterface;
const input = new RouterInput(stack, 'FailoverInput', {
routerInputName: 'failover-input',
maximumBitrate: Bitrate.mbps(10),
routingScope: RoutingScope.REGIONAL,
tier: RouterInputTier.INPUT_20,
configuration: RouterInputConfiguration.failover({
networkInterface: networkInterface,
protocols: [
RouterInputProtocol.rist({
port: 5000,
recoveryLatency: Duration.millis(1000),
}),
RouterInputProtocol.rist({
port: 5002, // Must not be consecutive with primary port
recoveryLatency: Duration.millis(1000),
}),
],
sourcePriority: SourcePriorityConfig.primarySecondary(PrimarySource.FIRST_SOURCE),
}),
});
# stack: Stack
# network_interface: RouterNetworkInterface
input = RouterInput(stack, "FailoverInput",
router_input_name="failover-input",
maximum_bitrate=Bitrate.mbps(10),
routing_scope=RoutingScope.REGIONAL,
tier=RouterInputTier.INPUT_20,
configuration=RouterInputConfiguration.failover(
network_interface=network_interface,
protocols=[
RouterInputProtocol.rist(
port=5000,
recovery_latency=Duration.millis(1000)
),
RouterInputProtocol.rist(
port=5002, # Must not be consecutive with primary port
recovery_latency=Duration.millis(1000)
)
],
source_priority=SourcePriorityConfig.primary_secondary(PrimarySource.FIRST_SOURCE)
)
)
Stack stack;
RouterNetworkInterface networkInterface;
RouterInput input = RouterInput.Builder.create(stack, "FailoverInput")
.routerInputName("failover-input")
.maximumBitrate(Bitrate.mbps(10))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterInputTier.INPUT_20)
.configuration(RouterInputConfiguration.failover(FailoverConfigurationProps.builder()
.networkInterface(networkInterface)
.protocols(List.of(RouterInputProtocol.rist(RistProtocolProps.builder()
.port(5000)
.recoveryLatency(Duration.millis(1000))
.build()), RouterInputProtocol.rist(RistProtocolProps.builder()
.port(5002) // Must not be consecutive with primary port
.recoveryLatency(Duration.millis(1000))
.build())))
.sourcePriority(SourcePriorityConfig.primarySecondary(PrimarySource.FIRST_SOURCE))
.build()))
.build();
Stack stack;
RouterNetworkInterface networkInterface;
var input = new RouterInput(stack, "FailoverInput", new RouterInputProps {
RouterInputName = "failover-input",
MaximumBitrate = Bitrate.Mbps(10),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterInputTier.INPUT_20,
Configuration = RouterInputConfiguration.Failover(new FailoverConfigurationProps {
NetworkInterface = networkInterface,
Protocols = new [] { RouterInputProtocol.Rist(new RistProtocolProps {
Port = 5000,
RecoveryLatency = Duration.Millis(1000)
}), RouterInputProtocol.Rist(new RistProtocolProps {
Port = 5002, // Must not be consecutive with primary port
RecoveryLatency = Duration.Millis(1000)
}) },
SourcePriority = SourcePriorityConfig.PrimarySecondary(PrimarySource.FIRST_SOURCE)
})
});
var stack Stack
var networkInterface RouterNetworkInterface
input := awsmediaconnectalpha.NewRouterInput(stack, jsii.String("FailoverInput"), &RouterInputProps{
RouterInputName: jsii.String("failover-input"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(10)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterInputTier_INPUT_20(),
Configuration: awsmediaconnectalpha.RouterInputConfiguration_Failover(&FailoverConfigurationProps{
NetworkInterface: networkInterface,
Protocols: []RouterInputProtocol{
awsmediaconnectalpha.RouterInputProtocol_Rist(&RistProtocolProps{
Port: jsii.Number(5000),
RecoveryLatency: awscdk.Duration_Millis(jsii.Number(1000)),
}),
awsmediaconnectalpha.RouterInputProtocol_*Rist(&RistProtocolProps{
Port: jsii.Number(5002),
// Must not be consecutive with primary port
RecoveryLatency: awscdk.Duration_*Millis(jsii.Number(1000)),
}),
},
SourcePriority: awsmediaconnectalpha.SourcePriorityConfig_PrimarySecondary(awsmediaconnectalpha.PrimarySource_FIRST_SOURCE),
}),
})
MediaLive Channel Input
Connect a router input to a MediaLive channel. The outputName must match the name of an output configured in the channel's MediaConnect Router output group.
declare const stack: Stack;
declare const mediaLiveChannel: medialive.IChannel;
const input = new RouterInput(stack, 'ChannelInput', {
routerInputName: 'channel-input',
maximumBitrate: Bitrate.mbps(20),
routingScope: RoutingScope.REGIONAL,
tier: RouterInputTier.INPUT_20,
configuration: RouterInputConfiguration.mediaLiveChannel({
channel: mediaLiveChannel,
outputName: 'router-ts',
pipeline: MediaLivePipeline.PIPELINE_0,
}),
});
# stack: Stack
# media_live_channel: medialive.IChannel
input = RouterInput(stack, "ChannelInput",
router_input_name="channel-input",
maximum_bitrate=Bitrate.mbps(20),
routing_scope=RoutingScope.REGIONAL,
tier=RouterInputTier.INPUT_20,
configuration=RouterInputConfiguration.media_live_channel(
channel=media_live_channel,
output_name="router-ts",
pipeline=MediaLivePipeline.PIPELINE_0
)
)
Stack stack;
IChannel mediaLiveChannel;
RouterInput input = RouterInput.Builder.create(stack, "ChannelInput")
.routerInputName("channel-input")
.maximumBitrate(Bitrate.mbps(20))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterInputTier.INPUT_20)
.configuration(RouterInputConfiguration.mediaLiveChannel(MediaLiveChannelConfigurationProps.builder()
.channel(mediaLiveChannel)
.outputName("router-ts")
.pipeline(MediaLivePipeline.PIPELINE_0)
.build()))
.build();
Stack stack;
IChannel mediaLiveChannel;
var input = new RouterInput(stack, "ChannelInput", new RouterInputProps {
RouterInputName = "channel-input",
MaximumBitrate = Bitrate.Mbps(20),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterInputTier.INPUT_20,
Configuration = RouterInputConfiguration.MediaLiveChannel(new MediaLiveChannelConfigurationProps {
Channel = mediaLiveChannel,
OutputName = "router-ts",
Pipeline = MediaLivePipeline.PIPELINE_0
})
});
var stack Stack
var mediaLiveChannel IChannel
input := awsmediaconnectalpha.NewRouterInput(stack, jsii.String("ChannelInput"), &RouterInputProps{
RouterInputName: jsii.String("channel-input"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(20)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterInputTier_INPUT_20(),
Configuration: awsmediaconnectalpha.RouterInputConfiguration_MediaLiveChannel(&MediaLiveChannelConfigurationProps{
Channel: mediaLiveChannel,
OutputName: jsii.String("router-ts"),
Pipeline: awsmediaconnectalpha.MediaLivePipeline_PIPELINE_0,
}),
})
Tip: For full examples of wiring a MediaLive channel to a MediaConnect Router (including transit encryption), see the MediaLive L2 README — MediaConnect Router section.
declare const stack: Stack;
declare const mediaLiveChannel: medialive.IChannel;
declare const transitSecret: Secret; // must hold the same value as the channel's MediaConnectRouterSettings.shared() secret
const input = new RouterInput(stack, 'ChannelInput', {
routerInputName: 'channel-input',
maximumBitrate: Bitrate.mbps(20),
routingScope: RoutingScope.REGIONAL,
tier: RouterInputTier.INPUT_20,
configuration: RouterInputConfiguration.mediaLiveChannel({
channel: mediaLiveChannel,
outputName: 'router-ts',
pipeline: MediaLivePipeline.PIPELINE_0,
sourceTransitDecryption: { secret: transitSecret },
}),
});
from aws_cdk.aws_mediaconnect_alpha import TransitEncryption
# stack: Stack
# media_live_channel: medialive.IChannel
# transit_secret: Secret
# must hold the same value as the channel's MediaConnectRouterSettings.shared() secret
input = RouterInput(stack, "ChannelInput",
router_input_name="channel-input",
maximum_bitrate=Bitrate.mbps(20),
routing_scope=RoutingScope.REGIONAL,
tier=RouterInputTier.INPUT_20,
configuration=RouterInputConfiguration.media_live_channel(
channel=media_live_channel,
output_name="router-ts",
pipeline=MediaLivePipeline.PIPELINE_0,
source_transit_decryption=TransitEncryption(secret=transit_secret)
)
)
Stack stack;
IChannel mediaLiveChannel;
Secret transitSecret;
// must hold the same value as the channel's MediaConnectRouterSettings.shared() secret
RouterInput input = RouterInput.Builder.create(stack, "ChannelInput")
.routerInputName("channel-input")
.maximumBitrate(Bitrate.mbps(20))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterInputTier.INPUT_20)
.configuration(RouterInputConfiguration.mediaLiveChannel(MediaLiveChannelConfigurationProps.builder()
.channel(mediaLiveChannel)
.outputName("router-ts")
.pipeline(MediaLivePipeline.PIPELINE_0)
.sourceTransitDecryption(TransitEncryption.builder().secret(transitSecret).build())
.build()))
.build();
Stack stack;
IChannel mediaLiveChannel;
Secret transitSecret;
// must hold the same value as the channel's MediaConnectRouterSettings.shared() secret
var input = new RouterInput(stack, "ChannelInput", new RouterInputProps {
RouterInputName = "channel-input",
MaximumBitrate = Bitrate.Mbps(20),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterInputTier.INPUT_20,
Configuration = RouterInputConfiguration.MediaLiveChannel(new MediaLiveChannelConfigurationProps {
Channel = mediaLiveChannel,
OutputName = "router-ts",
Pipeline = MediaLivePipeline.PIPELINE_0,
SourceTransitDecryption = new TransitEncryption { Secret = transitSecret }
})
});
var stack Stack
var mediaLiveChannel IChannel
var transitSecret Secret
// must hold the same value as the channel's MediaConnectRouterSettings.shared() secret
input := awsmediaconnectalpha.NewRouterInput(stack, jsii.String("ChannelInput"), &RouterInputProps{
RouterInputName: jsii.String("channel-input"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(20)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterInputTier_INPUT_20(),
Configuration: awsmediaconnectalpha.RouterInputConfiguration_MediaLiveChannel(&MediaLiveChannelConfigurationProps{
Channel: mediaLiveChannel,
OutputName: jsii.String("router-ts"),
Pipeline: awsmediaconnectalpha.MediaLivePipeline_PIPELINE_0,
SourceTransitDecryption: &TransitEncryption{
Secret: transitSecret,
},
}),
})
Or prepare a router input for a MediaLive connection without specifying the channel (requires explicit availability zone):
declare const stack: Stack;
const input = new RouterInput(stack, 'ChannelInputNoConnection', {
routerInputName: 'channel-input-no-connection',
maximumBitrate: Bitrate.mbps(20),
routingScope: RoutingScope.REGIONAL,
tier: RouterInputTier.INPUT_20,
configuration: RouterInputConfiguration.mediaLiveChannelWithoutConnection({
availabilityZone: 'us-east-1a',
}),
});
# stack: Stack
input = RouterInput(stack, "ChannelInputNoConnection",
router_input_name="channel-input-no-connection",
maximum_bitrate=Bitrate.mbps(20),
routing_scope=RoutingScope.REGIONAL,
tier=RouterInputTier.INPUT_20,
configuration=RouterInputConfiguration.media_live_channel_without_connection(
availability_zone="us-east-1a"
)
)
Stack stack;
RouterInput input = RouterInput.Builder.create(stack, "ChannelInputNoConnection")
.routerInputName("channel-input-no-connection")
.maximumBitrate(Bitrate.mbps(20))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterInputTier.INPUT_20)
.configuration(RouterInputConfiguration.mediaLiveChannelWithoutConnection(MediaLiveChannelConfigurationWithoutConnectionProps.builder()
.availabilityZone("us-east-1a")
.build()))
.build();
Stack stack;
var input = new RouterInput(stack, "ChannelInputNoConnection", new RouterInputProps {
RouterInputName = "channel-input-no-connection",
MaximumBitrate = Bitrate.Mbps(20),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterInputTier.INPUT_20,
Configuration = RouterInputConfiguration.MediaLiveChannelWithoutConnection(new MediaLiveChannelConfigurationWithoutConnectionProps {
AvailabilityZone = "us-east-1a"
})
});
var stack Stack
input := awsmediaconnectalpha.NewRouterInput(stack, jsii.String("ChannelInputNoConnection"), &RouterInputProps{
RouterInputName: jsii.String("channel-input-no-connection"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(20)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterInputTier_INPUT_20(),
Configuration: awsmediaconnectalpha.RouterInputConfiguration_MediaLiveChannelWithoutConnection(&MediaLiveChannelConfigurationWithoutConnectionProps{
AvailabilityZone: jsii.String("us-east-1a"),
}),
})
MediaConnect Flow Input
Connect a router input to an existing MediaConnect flow:
declare const stack: Stack;
declare const flow: Flow;
declare const flowOutput: FlowOutput;
const input = new RouterInput(stack, 'FlowInput', {
routerInputName: 'flow-input',
maximumBitrate: Bitrate.mbps(20),
routingScope: RoutingScope.REGIONAL,
tier: RouterInputTier.INPUT_20,
configuration: RouterInputConfiguration.mediaConnectFlow({
flow: flow,
flowOutput: flowOutput,
}),
});
# stack: Stack
# flow: Flow
# flow_output: FlowOutput
input = RouterInput(stack, "FlowInput",
router_input_name="flow-input",
maximum_bitrate=Bitrate.mbps(20),
routing_scope=RoutingScope.REGIONAL,
tier=RouterInputTier.INPUT_20,
configuration=RouterInputConfiguration.media_connect_flow(
flow=flow,
flow_output=flow_output
)
)
Stack stack;
Flow flow;
FlowOutput flowOutput;
RouterInput input = RouterInput.Builder.create(stack, "FlowInput")
.routerInputName("flow-input")
.maximumBitrate(Bitrate.mbps(20))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterInputTier.INPUT_20)
.configuration(RouterInputConfiguration.mediaConnectFlow(MediaConnectFlowConfigurationProps.builder()
.flow(flow)
.flowOutput(flowOutput)
.build()))
.build();
Stack stack;
Flow flow;
FlowOutput flowOutput;
var input = new RouterInput(stack, "FlowInput", new RouterInputProps {
RouterInputName = "flow-input",
MaximumBitrate = Bitrate.Mbps(20),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterInputTier.INPUT_20,
Configuration = RouterInputConfiguration.MediaConnectFlow(new MediaConnectFlowConfigurationProps {
Flow = flow,
FlowOutput = flowOutput
})
});
var stack Stack
var flow Flow
var flowOutput FlowOutput
input := awsmediaconnectalpha.NewRouterInput(stack, jsii.String("FlowInput"), &RouterInputProps{
RouterInputName: jsii.String("flow-input"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(20)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterInputTier_INPUT_20(),
Configuration: awsmediaconnectalpha.RouterInputConfiguration_MediaConnectFlow(&MediaConnectFlowConfigurationProps{
Flow: flow,
FlowOutput: flowOutput,
}),
})
Or prepare a router input for a flow connection without specifying the flow (requires explicit availability zone):
declare const stack: Stack;
const input = new RouterInput(stack, 'FlowInputNoConnection', {
routerInputName: 'flow-input-no-connection',
maximumBitrate: Bitrate.mbps(20),
routingScope: RoutingScope.REGIONAL,
tier: RouterInputTier.INPUT_20,
configuration: RouterInputConfiguration.mediaConnectFlowWithoutConnection({
availabilityZone: 'us-east-1a',
}),
});
# stack: Stack
input = RouterInput(stack, "FlowInputNoConnection",
router_input_name="flow-input-no-connection",
maximum_bitrate=Bitrate.mbps(20),
routing_scope=RoutingScope.REGIONAL,
tier=RouterInputTier.INPUT_20,
configuration=RouterInputConfiguration.media_connect_flow_without_connection(
availability_zone="us-east-1a"
)
)
Stack stack;
RouterInput input = RouterInput.Builder.create(stack, "FlowInputNoConnection")
.routerInputName("flow-input-no-connection")
.maximumBitrate(Bitrate.mbps(20))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterInputTier.INPUT_20)
.configuration(RouterInputConfiguration.mediaConnectFlowWithoutConnection(MediaConnectFlowConfigurationWithoutConnectionProps.builder()
.availabilityZone("us-east-1a")
.build()))
.build();
Stack stack;
var input = new RouterInput(stack, "FlowInputNoConnection", new RouterInputProps {
RouterInputName = "flow-input-no-connection",
MaximumBitrate = Bitrate.Mbps(20),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterInputTier.INPUT_20,
Configuration = RouterInputConfiguration.MediaConnectFlowWithoutConnection(new MediaConnectFlowConfigurationWithoutConnectionProps {
AvailabilityZone = "us-east-1a"
})
});
var stack Stack
input := awsmediaconnectalpha.NewRouterInput(stack, jsii.String("FlowInputNoConnection"), &RouterInputProps{
RouterInputName: jsii.String("flow-input-no-connection"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(20)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterInputTier_INPUT_20(),
Configuration: awsmediaconnectalpha.RouterInputConfiguration_MediaConnectFlowWithoutConnection(&MediaConnectFlowConfigurationWithoutConnectionProps{
AvailabilityZone: jsii.String("us-east-1a"),
}),
})
Router Outputs
Router outputs send video streams to various destinations including standard protocols, MediaLive inputs, and MediaConnect flows:
Standard Output with SRT Protocol
declare const stack: Stack;
declare const networkInterface: RouterNetworkInterface;
const output = new RouterOutput(stack, 'SrtOutput', {
routerOutputName: 'srt-output',
maximumBitrate: Bitrate.mbps(10),
routingScope: RoutingScope.REGIONAL,
// tier defaults to RouterOutputTier.OUTPUT_20 (lowest cost)
configuration: RouterOutputConfiguration.standard({
protocol: RouterOutputProtocol.srtListener({
port: 9001,
minimumLatency: Duration.millis(200),
}),
networkInterface: networkInterface,
}),
});
# stack: Stack
# network_interface: RouterNetworkInterface
output = RouterOutput(stack, "SrtOutput",
router_output_name="srt-output",
maximum_bitrate=Bitrate.mbps(10),
routing_scope=RoutingScope.REGIONAL,
# tier defaults to RouterOutputTier.OUTPUT_20 (lowest cost)
configuration=RouterOutputConfiguration.standard(
protocol=RouterOutputProtocol.srt_listener(
port=9001,
minimum_latency=Duration.millis(200)
),
network_interface=network_interface
)
)
Stack stack;
RouterNetworkInterface networkInterface;
RouterOutput output = RouterOutput.Builder.create(stack, "SrtOutput")
.routerOutputName("srt-output")
.maximumBitrate(Bitrate.mbps(10))
.routingScope(RoutingScope.REGIONAL)
// tier defaults to RouterOutputTier.OUTPUT_20 (lowest cost)
.configuration(RouterOutputConfiguration.standard(StandardOutputConfigurationProps.builder()
.protocol(RouterOutputProtocol.srtListener(SrtListenerOutputProtocolProps.builder()
.port(9001)
.minimumLatency(Duration.millis(200))
.build()))
.networkInterface(networkInterface)
.build()))
.build();
Stack stack;
RouterNetworkInterface networkInterface;
var output = new RouterOutput(stack, "SrtOutput", new RouterOutputProps {
RouterOutputName = "srt-output",
MaximumBitrate = Bitrate.Mbps(10),
RoutingScope = RoutingScope.REGIONAL,
// tier defaults to RouterOutputTier.OUTPUT_20 (lowest cost)
Configuration = RouterOutputConfiguration.Standard(new StandardOutputConfigurationProps {
Protocol = RouterOutputProtocol.SrtListener(new SrtListenerOutputProtocolProps {
Port = 9001,
MinimumLatency = Duration.Millis(200)
}),
NetworkInterface = networkInterface
})
});
var stack Stack
var networkInterface RouterNetworkInterface
output := awsmediaconnectalpha.NewRouterOutput(stack, jsii.String("SrtOutput"), &RouterOutputProps{
RouterOutputName: jsii.String("srt-output"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(10)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
// tier defaults to RouterOutputTier.OUTPUT_20 (lowest cost)
Configuration: awsmediaconnectalpha.RouterOutputConfiguration_Standard(&StandardOutputConfigurationProps{
Protocol: awsmediaconnectalpha.RouterOutputProtocol_SrtListener(&SrtListenerOutputProtocolProps{
Port: jsii.Number(9001),
MinimumLatency: awscdk.Duration_Millis(jsii.Number(200)),
}),
NetworkInterface: networkInterface,
}),
})
Note: The
tierproperty defaults to the lowest (and cheapest) tier:INPUT_20for Router Inputs andOUTPUT_20for Router Outputs. The construct validates thatmaximumBitratedoes not exceed the tier's capacity (20, 50, or 100 Mbps) at synth time. Per the documentation, if an input is 20 Mbps you can't route it to an output set up for less than 20 Mbps.
MediaLive Output
Connect a router output to a MediaLive input (the input must be a MediaConnect Router type):
declare const stack: Stack;
declare const mediaLiveInput: medialive.IInput;
const output = new RouterOutput(stack, 'MediaLiveOutput', {
routerOutputName: 'medialive-output',
maximumBitrate: Bitrate.mbps(15),
routingScope: RoutingScope.GLOBAL,
tier: RouterOutputTier.OUTPUT_20,
configuration: RouterOutputConfiguration.mediaLiveInput({
input: mediaLiveInput,
pipeline: MediaLivePipeline.PIPELINE_0,
}),
});
# stack: Stack
# media_live_input: medialive.IInput
output = RouterOutput(stack, "MediaLiveOutput",
router_output_name="medialive-output",
maximum_bitrate=Bitrate.mbps(15),
routing_scope=RoutingScope.GLOBAL,
tier=RouterOutputTier.OUTPUT_20,
configuration=RouterOutputConfiguration.media_live_input(
input=media_live_input,
pipeline=MediaLivePipeline.PIPELINE_0
)
)
Stack stack;
IInput mediaLiveInput;
RouterOutput output = RouterOutput.Builder.create(stack, "MediaLiveOutput")
.routerOutputName("medialive-output")
.maximumBitrate(Bitrate.mbps(15))
.routingScope(RoutingScope.GLOBAL)
.tier(RouterOutputTier.OUTPUT_20)
.configuration(RouterOutputConfiguration.mediaLiveInput(MediaLiveInputConnectionProps.builder()
.input(mediaLiveInput)
.pipeline(MediaLivePipeline.PIPELINE_0)
.build()))
.build();
Stack stack;
IInput mediaLiveInput;
var output = new RouterOutput(stack, "MediaLiveOutput", new RouterOutputProps {
RouterOutputName = "medialive-output",
MaximumBitrate = Bitrate.Mbps(15),
RoutingScope = RoutingScope.GLOBAL,
Tier = RouterOutputTier.OUTPUT_20,
Configuration = RouterOutputConfiguration.MediaLiveInput(new MediaLiveInputConnectionProps {
Input = mediaLiveInput,
Pipeline = MediaLivePipeline.PIPELINE_0
})
});
var stack Stack
var mediaLiveInput IInput
output := awsmediaconnectalpha.NewRouterOutput(stack, jsii.String("MediaLiveOutput"), &RouterOutputProps{
RouterOutputName: jsii.String("medialive-output"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(15)),
RoutingScope: awsmediaconnectalpha.RoutingScope_GLOBAL(),
Tier: awsmediaconnectalpha.RouterOutputTier_OUTPUT_20(),
Configuration: awsmediaconnectalpha.RouterOutputConfiguration_MediaLiveInput(&MediaLiveInputConnectionProps{
Input: mediaLiveInput,
Pipeline: awsmediaconnectalpha.MediaLivePipeline_PIPELINE_0,
}),
})
Or prepare a router output for a MediaLive connection without specifying the input (requires explicit availability zone):
declare const stack: Stack;
const output = new RouterOutput(stack, 'MediaLiveOutputNoConnection', {
routerOutputName: 'medialive-output-no-connection',
maximumBitrate: Bitrate.mbps(15),
routingScope: RoutingScope.GLOBAL,
tier: RouterOutputTier.OUTPUT_20,
configuration: RouterOutputConfiguration.mediaLiveInputWithoutConnection({
availabilityZone: 'us-east-1a',
}),
});
# stack: Stack
output = RouterOutput(stack, "MediaLiveOutputNoConnection",
router_output_name="medialive-output-no-connection",
maximum_bitrate=Bitrate.mbps(15),
routing_scope=RoutingScope.GLOBAL,
tier=RouterOutputTier.OUTPUT_20,
configuration=RouterOutputConfiguration.media_live_input_without_connection(
availability_zone="us-east-1a"
)
)
Stack stack;
RouterOutput output = RouterOutput.Builder.create(stack, "MediaLiveOutputNoConnection")
.routerOutputName("medialive-output-no-connection")
.maximumBitrate(Bitrate.mbps(15))
.routingScope(RoutingScope.GLOBAL)
.tier(RouterOutputTier.OUTPUT_20)
.configuration(RouterOutputConfiguration.mediaLiveInputWithoutConnection(MediaLiveNoInputConnectionProps.builder()
.availabilityZone("us-east-1a")
.build()))
.build();
Stack stack;
var output = new RouterOutput(stack, "MediaLiveOutputNoConnection", new RouterOutputProps {
RouterOutputName = "medialive-output-no-connection",
MaximumBitrate = Bitrate.Mbps(15),
RoutingScope = RoutingScope.GLOBAL,
Tier = RouterOutputTier.OUTPUT_20,
Configuration = RouterOutputConfiguration.MediaLiveInputWithoutConnection(new MediaLiveNoInputConnectionProps {
AvailabilityZone = "us-east-1a"
})
});
var stack Stack
output := awsmediaconnectalpha.NewRouterOutput(stack, jsii.String("MediaLiveOutputNoConnection"), &RouterOutputProps{
RouterOutputName: jsii.String("medialive-output-no-connection"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(15)),
RoutingScope: awsmediaconnectalpha.RoutingScope_GLOBAL(),
Tier: awsmediaconnectalpha.RouterOutputTier_OUTPUT_20(),
Configuration: awsmediaconnectalpha.RouterOutputConfiguration_MediaLiveInputWithoutConnection(&MediaLiveNoInputConnectionProps{
AvailabilityZone: jsii.String("us-east-1a"),
}),
})
MediaConnect Flow Output
Connect a router output to an existing MediaConnect flow:
declare const stack: Stack;
declare const flow: Flow;
const output = new RouterOutput(stack, 'FlowOutput', {
routerOutputName: 'flow-output',
maximumBitrate: Bitrate.mbps(20),
routingScope: RoutingScope.REGIONAL,
tier: RouterOutputTier.OUTPUT_20,
configuration: RouterOutputConfiguration.mediaConnectFlow({
flow: flow,
}),
});
# stack: Stack
# flow: Flow
output = RouterOutput(stack, "FlowOutput",
router_output_name="flow-output",
maximum_bitrate=Bitrate.mbps(20),
routing_scope=RoutingScope.REGIONAL,
tier=RouterOutputTier.OUTPUT_20,
configuration=RouterOutputConfiguration.media_connect_flow(
flow=flow
)
)
Stack stack;
Flow flow;
RouterOutput output = RouterOutput.Builder.create(stack, "FlowOutput")
.routerOutputName("flow-output")
.maximumBitrate(Bitrate.mbps(20))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterOutputTier.OUTPUT_20)
.configuration(RouterOutputConfiguration.mediaConnectFlow(MediaConnectFlowConnectionProps.builder()
.flow(flow)
.build()))
.build();
Stack stack;
Flow flow;
var output = new RouterOutput(stack, "FlowOutput", new RouterOutputProps {
RouterOutputName = "flow-output",
MaximumBitrate = Bitrate.Mbps(20),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterOutputTier.OUTPUT_20,
Configuration = RouterOutputConfiguration.MediaConnectFlow(new MediaConnectFlowConnectionProps {
Flow = flow
})
});
var stack Stack
var flow Flow
output := awsmediaconnectalpha.NewRouterOutput(stack, jsii.String("FlowOutput"), &RouterOutputProps{
RouterOutputName: jsii.String("flow-output"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(20)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterOutputTier_OUTPUT_20(),
Configuration: awsmediaconnectalpha.RouterOutputConfiguration_MediaConnectFlow(&MediaConnectFlowConnectionProps{
Flow: flow,
}),
})
Or prepare a router output for a flow connection without specifying the flow (requires explicit availability zone):
declare const stack: Stack;
const output = new RouterOutput(stack, 'FlowOutputNoConnection', {
routerOutputName: 'flow-output-no-connection',
maximumBitrate: Bitrate.mbps(20),
routingScope: RoutingScope.REGIONAL,
tier: RouterOutputTier.OUTPUT_20,
configuration: RouterOutputConfiguration.mediaConnectFlowWithoutConnection({
availabilityZone: 'us-east-1a',
}),
});
# stack: Stack
output = RouterOutput(stack, "FlowOutputNoConnection",
router_output_name="flow-output-no-connection",
maximum_bitrate=Bitrate.mbps(20),
routing_scope=RoutingScope.REGIONAL,
tier=RouterOutputTier.OUTPUT_20,
configuration=RouterOutputConfiguration.media_connect_flow_without_connection(
availability_zone="us-east-1a"
)
)
Stack stack;
RouterOutput output = RouterOutput.Builder.create(stack, "FlowOutputNoConnection")
.routerOutputName("flow-output-no-connection")
.maximumBitrate(Bitrate.mbps(20))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterOutputTier.OUTPUT_20)
.configuration(RouterOutputConfiguration.mediaConnectFlowWithoutConnection(MediaConnectFlowNoConnectionProps.builder()
.availabilityZone("us-east-1a")
.build()))
.build();
Stack stack;
var output = new RouterOutput(stack, "FlowOutputNoConnection", new RouterOutputProps {
RouterOutputName = "flow-output-no-connection",
MaximumBitrate = Bitrate.Mbps(20),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterOutputTier.OUTPUT_20,
Configuration = RouterOutputConfiguration.MediaConnectFlowWithoutConnection(new MediaConnectFlowNoConnectionProps {
AvailabilityZone = "us-east-1a"
})
});
var stack Stack
output := awsmediaconnectalpha.NewRouterOutput(stack, jsii.String("FlowOutputNoConnection"), &RouterOutputProps{
RouterOutputName: jsii.String("flow-output-no-connection"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(20)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterOutputTier_OUTPUT_20(),
Configuration: awsmediaconnectalpha.RouterOutputConfiguration_MediaConnectFlowWithoutConnection(&MediaConnectFlowNoConnectionProps{
AvailabilityZone: jsii.String("us-east-1a"),
}),
})
Output with Encryption
declare const stack: Stack;
declare const networkInterface: RouterNetworkInterface;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;
const output = new RouterOutput(stack, 'EncryptedOutput', {
routerOutputName: 'encrypted-output',
maximumBitrate: Bitrate.mbps(10),
routingScope: RoutingScope.REGIONAL,
tier: RouterOutputTier.OUTPUT_20,
configuration: RouterOutputConfiguration.standard({
protocol: RouterOutputProtocol.srtCaller({
destinationAddress: '203.0.113.100',
destinationPort: 9001,
minimumLatency: Duration.millis(200),
encryptionConfiguration: { role, secret },
}),
networkInterface: networkInterface,
}),
});
from aws_cdk.aws_mediaconnect_alpha import RouterSrtEncryption
# stack: Stack
# network_interface: RouterNetworkInterface
# role: iam.IRole
# secret: secretsmanager.ISecret
output = RouterOutput(stack, "EncryptedOutput",
router_output_name="encrypted-output",
maximum_bitrate=Bitrate.mbps(10),
routing_scope=RoutingScope.REGIONAL,
tier=RouterOutputTier.OUTPUT_20,
configuration=RouterOutputConfiguration.standard(
protocol=RouterOutputProtocol.srt_caller(
destination_address="203.0.113.100",
destination_port=9001,
minimum_latency=Duration.millis(200),
encryption_configuration=RouterSrtEncryption(role=role, secret=secret)
),
network_interface=network_interface
)
)
Stack stack;
RouterNetworkInterface networkInterface;
IRole role;
ISecret secret;
RouterOutput output = RouterOutput.Builder.create(stack, "EncryptedOutput")
.routerOutputName("encrypted-output")
.maximumBitrate(Bitrate.mbps(10))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterOutputTier.OUTPUT_20)
.configuration(RouterOutputConfiguration.standard(StandardOutputConfigurationProps.builder()
.protocol(RouterOutputProtocol.srtCaller(SrtCallerOutputProtocolProps.builder()
.destinationAddress("203.0.113.100")
.destinationPort(9001)
.minimumLatency(Duration.millis(200))
.encryptionConfiguration(RouterSrtEncryption.builder().role(role).secret(secret).build())
.build()))
.networkInterface(networkInterface)
.build()))
.build();
Stack stack;
RouterNetworkInterface networkInterface;
IRole role;
ISecret secret;
var output = new RouterOutput(stack, "EncryptedOutput", new RouterOutputProps {
RouterOutputName = "encrypted-output",
MaximumBitrate = Bitrate.Mbps(10),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterOutputTier.OUTPUT_20,
Configuration = RouterOutputConfiguration.Standard(new StandardOutputConfigurationProps {
Protocol = RouterOutputProtocol.SrtCaller(new SrtCallerOutputProtocolProps {
DestinationAddress = "203.0.113.100",
DestinationPort = 9001,
MinimumLatency = Duration.Millis(200),
EncryptionConfiguration = new RouterSrtEncryption { Role = role, Secret = secret }
}),
NetworkInterface = networkInterface
})
});
var stack Stack
var networkInterface RouterNetworkInterface
var role IRole
var secret ISecret
output := awsmediaconnectalpha.NewRouterOutput(stack, jsii.String("EncryptedOutput"), &RouterOutputProps{
RouterOutputName: jsii.String("encrypted-output"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(10)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterOutputTier_OUTPUT_20(),
Configuration: awsmediaconnectalpha.RouterOutputConfiguration_Standard(&StandardOutputConfigurationProps{
Protocol: awsmediaconnectalpha.RouterOutputProtocol_SrtCaller(&SrtCallerOutputProtocolProps{
DestinationAddress: jsii.String("203.0.113.100"),
DestinationPort: jsii.Number(9001),
MinimumLatency: awscdk.Duration_Millis(jsii.Number(200)),
EncryptionConfiguration: &RouterSrtEncryption{
Role: *Role,
Secret: *Secret,
},
}),
NetworkInterface: networkInterface,
}),
})
Flows
A MediaConnect flow represents a transport stream connection between a source and one or more outputs. Flows are the primary resource for transporting live video content.
Creating a Flow
The following example creates a basic MediaConnect flow with an RTP source:
declare const stack: Stack;
const flow = new Flow(stack, 'MyFlow', {
flowName: 'my-live-stream',
source: SourceConfiguration.rtp({
flowSourceName: 'my-source',
port: 5000,
network: NetworkConfiguration.publicNetwork('203.0.113.0/24'),
}),
});
# stack: Stack
flow = Flow(stack, "MyFlow",
flow_name="my-live-stream",
source=SourceConfiguration.rtp(
flow_source_name="my-source",
port=5000,
network=NetworkConfiguration.public_network("203.0.113.0/24")
)
)
Stack stack;
Flow flow = Flow.Builder.create(stack, "MyFlow")
.flowName("my-live-stream")
.source(SourceConfiguration.rtp(SourceRtp.builder()
.flowSourceName("my-source")
.port(5000)
.network(NetworkConfiguration.publicNetwork("203.0.113.0/24"))
.build()))
.build();
Stack stack;
var flow = new Flow(stack, "MyFlow", new FlowProps {
FlowName = "my-live-stream",
Source = SourceConfiguration.Rtp(new SourceRtp {
FlowSourceName = "my-source",
Port = 5000,
Network = NetworkConfiguration.PublicNetwork("203.0.113.0/24")
})
});
var stack Stack
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
FlowName: jsii.String("my-live-stream"),
Source: awsmediaconnectalpha.SourceConfiguration_Rtp(&SourceRtp{
FlowSourceName: jsii.String("my-source"),
Port: jsii.Number(5000),
Network: awsmediaconnectalpha.NetworkConfiguration_PublicNetwork(jsii.String("203.0.113.0/24")),
}),
})
Flow Sources
MediaConnect supports multiple source types for ingesting content into a flow. The examples below use NetworkConfiguration.publicNetwork() for simplicity, but all protocol-based sources can also use NetworkConfiguration.vpc() with a VPC interface for private connectivity.
SRT Listener Source
SRT (Secure Reliable Transport) in listener mode configures MediaConnect to listen on a specific port for incoming content. The upstream device connects to MediaConnect as a caller.
declare const stack: Stack;
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.srtListener({
flowSourceName: 'live-encoder-source',
description: 'Live encoder feed',
port: 5000,
minLatency: Duration.millis(2000),
network: NetworkConfiguration.publicNetwork('203.0.113.0/24'),
}),
});
# stack: Stack
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.srt_listener(
flow_source_name="live-encoder-source",
description="Live encoder feed",
port=5000,
min_latency=Duration.millis(2000),
network=NetworkConfiguration.public_network("203.0.113.0/24")
)
)
Stack stack;
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.srtListener(SourceSrtListener.builder()
.flowSourceName("live-encoder-source")
.description("Live encoder feed")
.port(5000)
.minLatency(Duration.millis(2000))
.network(NetworkConfiguration.publicNetwork("203.0.113.0/24"))
.build()))
.build();
Stack stack;
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.SrtListener(new SourceSrtListener {
FlowSourceName = "live-encoder-source",
Description = "Live encoder feed",
Port = 5000,
MinLatency = Duration.Millis(2000),
Network = NetworkConfiguration.PublicNetwork("203.0.113.0/24")
})
});
var stack Stack
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_SrtListener(&SourceSrtListener{
FlowSourceName: jsii.String("live-encoder-source"),
Description: jsii.String("Live encoder feed"),
Port: jsii.Number(5000),
MinLatency: awscdk.Duration_Millis(jsii.Number(2000)),
Network: awsmediaconnectalpha.NetworkConfiguration_PublicNetwork(jsii.String("203.0.113.0/24")),
}),
})
SRT Caller Source
SRT in caller mode configures MediaConnect to connect to a remote SRT listener. Use this when the source device is listening for incoming connections rather than pushing content.
declare const stack: Stack;
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.srtCaller({
flowSourceName: 'remote-source',
sourceListenerAddress: '203.0.113.50',
sourceListenerPort: 5000,
minLatency: Duration.millis(200),
}),
});
# stack: Stack
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.srt_caller(
flow_source_name="remote-source",
source_listener_address="203.0.113.50",
source_listener_port=5000,
min_latency=Duration.millis(200)
)
)
Stack stack;
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.srtCaller(SourceSrtCaller.builder()
.flowSourceName("remote-source")
.sourceListenerAddress("203.0.113.50")
.sourceListenerPort(5000)
.minLatency(Duration.millis(200))
.build()))
.build();
Stack stack;
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.SrtCaller(new SourceSrtCaller {
FlowSourceName = "remote-source",
SourceListenerAddress = "203.0.113.50",
SourceListenerPort = 5000,
MinLatency = Duration.Millis(200)
})
});
var stack Stack
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_SrtCaller(&SourceSrtCaller{
FlowSourceName: jsii.String("remote-source"),
SourceListenerAddress: jsii.String("203.0.113.50"),
SourceListenerPort: jsii.Number(5000),
MinLatency: awscdk.Duration_Millis(jsii.Number(200)),
}),
})
RTP Source
RTP (Real-time Transport Protocol) is a standard protocol for delivering audio and video over IP networks.
declare const stack: Stack;
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.rtp({
flowSourceName: 'rtp-source',
port: 5000,
network: NetworkConfiguration.publicNetwork('203.0.113.0/24'),
}),
});
# stack: Stack
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.rtp(
flow_source_name="rtp-source",
port=5000,
network=NetworkConfiguration.public_network("203.0.113.0/24")
)
)
Stack stack;
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.rtp(SourceRtp.builder()
.flowSourceName("rtp-source")
.port(5000)
.network(NetworkConfiguration.publicNetwork("203.0.113.0/24"))
.build()))
.build();
Stack stack;
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.Rtp(new SourceRtp {
FlowSourceName = "rtp-source",
Port = 5000,
Network = NetworkConfiguration.PublicNetwork("203.0.113.0/24")
})
});
var stack Stack
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_Rtp(&SourceRtp{
FlowSourceName: jsii.String("rtp-source"),
Port: jsii.Number(5000),
Network: awsmediaconnectalpha.NetworkConfiguration_PublicNetwork(jsii.String("203.0.113.0/24")),
}),
})
RTP-FEC Source
RTP with Forward Error Correction adds redundancy to recover lost packets without retransmission. Use this when contributing via RTP and you need packet recovery.
declare const stack: Stack;
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.rtpFec({
flowSourceName: 'rtp-fec-source',
port: 5000,
network: NetworkConfiguration.publicNetwork('203.0.113.0/24'),
}),
});
# stack: Stack
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.rtp_fec(
flow_source_name="rtp-fec-source",
port=5000,
network=NetworkConfiguration.public_network("203.0.113.0/24")
)
)
Stack stack;
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.rtpFec(SourceRtp.builder()
.flowSourceName("rtp-fec-source")
.port(5000)
.network(NetworkConfiguration.publicNetwork("203.0.113.0/24"))
.build()))
.build();
Stack stack;
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.RtpFec(new SourceRtp {
FlowSourceName = "rtp-fec-source",
Port = 5000,
Network = NetworkConfiguration.PublicNetwork("203.0.113.0/24")
})
});
var stack Stack
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_RtpFec(&SourceRtp{
FlowSourceName: jsii.String("rtp-fec-source"),
Port: jsii.Number(5000),
Network: awsmediaconnectalpha.NetworkConfiguration_PublicNetwork(jsii.String("203.0.113.0/24")),
}),
})
RIST Source
RIST (Reliable Internet Stream Transport) provides reliable video transport with packet recovery.
declare const stack: Stack;
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.rist({
flowSourceName: 'rist-source',
port: 5000,
maxLatency: Duration.millis(2000),
network: NetworkConfiguration.publicNetwork('203.0.113.0/24'),
}),
});
# stack: Stack
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.rist(
flow_source_name="rist-source",
port=5000,
max_latency=Duration.millis(2000),
network=NetworkConfiguration.public_network("203.0.113.0/24")
)
)
Stack stack;
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.rist(SourceRist.builder()
.flowSourceName("rist-source")
.port(5000)
.maxLatency(Duration.millis(2000))
.network(NetworkConfiguration.publicNetwork("203.0.113.0/24"))
.build()))
.build();
Stack stack;
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.Rist(new SourceRist {
FlowSourceName = "rist-source",
Port = 5000,
MaxLatency = Duration.Millis(2000),
Network = NetworkConfiguration.PublicNetwork("203.0.113.0/24")
})
});
var stack Stack
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_Rist(&SourceRist{
FlowSourceName: jsii.String("rist-source"),
Port: jsii.Number(5000),
MaxLatency: awscdk.Duration_Millis(jsii.Number(2000)),
Network: awsmediaconnectalpha.NetworkConfiguration_PublicNetwork(jsii.String("203.0.113.0/24")),
}),
})
Zixi Push Source
Zixi Push uses the Zixi protocol for reliable video transport. Content is pushed to MediaConnect from a Zixi-compatible component upstream.
declare const stack: Stack;
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.zixiPush({
flowSourceName: 'zixi-source',
maxLatency: Duration.millis(2000),
network: NetworkConfiguration.publicNetwork('203.0.113.0/24'),
}),
});
# stack: Stack
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.zixi_push(
flow_source_name="zixi-source",
max_latency=Duration.millis(2000),
network=NetworkConfiguration.public_network("203.0.113.0/24")
)
)
Stack stack;
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.zixiPush(SourceZixiPush.builder()
.flowSourceName("zixi-source")
.maxLatency(Duration.millis(2000))
.network(NetworkConfiguration.publicNetwork("203.0.113.0/24"))
.build()))
.build();
Stack stack;
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.ZixiPush(new SourceZixiPush {
FlowSourceName = "zixi-source",
MaxLatency = Duration.Millis(2000),
Network = NetworkConfiguration.PublicNetwork("203.0.113.0/24")
})
});
var stack Stack
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_ZixiPush(&SourceZixiPush{
FlowSourceName: jsii.String("zixi-source"),
MaxLatency: awscdk.Duration_Millis(jsii.Number(2000)),
Network: awsmediaconnectalpha.NetworkConfiguration_PublicNetwork(jsii.String("203.0.113.0/24")),
}),
})
Zixi Push ports are assigned by MediaConnect: 2088 for public sources, 2090-2099 for VPC sources. See Source port assignments.
Router Source
Use a router source when the flow's source comes from a MediaConnect Router rather than a direct connection.
declare const stack: Stack;
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.router(),
});
# stack: Stack
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.router()
)
Stack stack;
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.router())
.build();
Stack stack;
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.Router()
});
var stack Stack
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_Router(),
})
VPC Source
Use a VPC-based source when you need a connection between a flow and your Amazon VPC. This enables private connectivity for receiving content from on-premises equipment via AWS Direct Connect or VPN, or from other AWS services running in your VPC.
declare const stack: Stack;
declare const securityGroup: ec2.ISecurityGroup;
declare const subnet: ec2.ISubnet;
declare const role: iam.IRole;
const vpcInterface = VpcInterface.define({
vpcInterfaceName: 'my-vpc-interface',
role: role,
securityGroups: [securityGroup],
subnet: subnet,
});
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.rist({
flowSourceName: 'vpc-source',
description: 'VPC-based source',
port: 5000,
maxLatency: Duration.millis(2000),
network: NetworkConfiguration.vpc(vpcInterface),
}),
vpcInterfaces: [vpcInterface],
});
# stack: Stack
# security_group: ec2.ISecurityGroup
# subnet: ec2.ISubnet
# role: iam.IRole
vpc_interface = VpcInterface.define(
vpc_interface_name="my-vpc-interface",
role=role,
security_groups=[security_group],
subnet=subnet
)
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.rist(
flow_source_name="vpc-source",
description="VPC-based source",
port=5000,
max_latency=Duration.millis(2000),
network=NetworkConfiguration.vpc(vpc_interface)
),
vpc_interfaces=[vpc_interface]
)
Stack stack;
ISecurityGroup securityGroup;
ISubnet subnet;
IRole role;
VpcInterfaceConfig vpcInterface = VpcInterface.define(VpcInterfaceDefineProps.builder()
.vpcInterfaceName("my-vpc-interface")
.role(role)
.securityGroups(List.of(securityGroup))
.subnet(subnet)
.build());
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.rist(SourceRist.builder()
.flowSourceName("vpc-source")
.description("VPC-based source")
.port(5000)
.maxLatency(Duration.millis(2000))
.network(NetworkConfiguration.vpc(vpcInterface))
.build()))
.vpcInterfaces(List.of(vpcInterface))
.build();
Stack stack;
ISecurityGroup securityGroup;
ISubnet subnet;
IRole role;
var vpcInterface = VpcInterface.Define(new VpcInterfaceDefineProps {
VpcInterfaceName = "my-vpc-interface",
Role = role,
SecurityGroups = new [] { securityGroup },
Subnet = subnet
});
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.Rist(new SourceRist {
FlowSourceName = "vpc-source",
Description = "VPC-based source",
Port = 5000,
MaxLatency = Duration.Millis(2000),
Network = NetworkConfiguration.Vpc(vpcInterface)
}),
VpcInterfaces = new [] { vpcInterface }
});
var stack Stack
var securityGroup ISecurityGroup
var subnet ISubnet
var role IRole
vpcInterface := awsmediaconnectalpha.VpcInterface_Define(&VpcInterfaceDefineProps{
VpcInterfaceName: jsii.String("my-vpc-interface"),
Role: role,
SecurityGroups: []ISecurityGroup{
securityGroup,
},
Subnet: subnet,
})
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_Rist(&SourceRist{
FlowSourceName: jsii.String("vpc-source"),
Description: jsii.String("VPC-based source"),
Port: jsii.Number(5000),
MaxLatency: awscdk.Duration_Millis(jsii.Number(2000)),
Network: awsmediaconnectalpha.NetworkConfiguration_Vpc(vpcInterface),
}),
VpcInterfaces: []VpcInterfaceConfig{
vpcInterface,
},
})
Entitled Source (From Another AWS Account)
Entitlements allow you to subscribe to content from another AWS account. The entitlement is created by the content originator in their AWS account, and you import it using the entitlement ARN they provide.
declare const stack: Stack;
// Import an entitlement from another AWS account
const entitlement = FlowEntitlement.fromFlowEntitlementArn(stack, 'ImportedEntitlement',
'arn:aws:mediaconnect:us-west-2:111122223333:entitlement:1-11111111111111111111111111111111:MyEntitlement',
);
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.entitlement({
entitlement: entitlement,
}),
});
# stack: Stack
# Import an entitlement from another AWS account
entitlement = FlowEntitlement.from_flow_entitlement_arn(stack, "ImportedEntitlement", "arn:aws:mediaconnect:us-west-2:111122223333:entitlement:1-11111111111111111111111111111111:MyEntitlement")
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.entitlement(
entitlement=entitlement
)
)
Stack stack;
// Import an entitlement from another AWS account
IFlowEntitlement entitlement = FlowEntitlement.fromFlowEntitlementArn(stack, "ImportedEntitlement", "arn:aws:mediaconnect:us-west-2:111122223333:entitlement:1-11111111111111111111111111111111:MyEntitlement");
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.entitlement(EntitlementSource.builder()
.entitlement(entitlement)
.build()))
.build();
Stack stack;
// Import an entitlement from another AWS account
var entitlement = FlowEntitlement.FromFlowEntitlementArn(stack, "ImportedEntitlement", "arn:aws:mediaconnect:us-west-2:111122223333:entitlement:1-11111111111111111111111111111111:MyEntitlement");
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.Entitlement(new EntitlementSource {
Entitlement = entitlement
})
});
var stack Stack
// Import an entitlement from another AWS account
entitlement := awsmediaconnectalpha.FlowEntitlement_FromFlowEntitlementArn(stack, jsii.String("ImportedEntitlement"), jsii.String("arn:aws:mediaconnect:us-west-2:111122223333:entitlement:1-11111111111111111111111111111111:MyEntitlement"))
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_Entitlement(&EntitlementSource{
Entitlement: entitlement,
}),
})
Gateway Bridge Source
Use a gateway bridge source when ingesting content from on-premises equipment through a MediaConnect gateway and bridge. Gateways define the network infrastructure that bridges use to transport video between on-premises and cloud environments.
declare const stack: Stack;
declare const bridge: Bridge;
declare const role: iam.IRole;
declare const securityGroup: ec2.ISecurityGroup;
declare const subnet: ec2.ISubnet;
const vpcInterface = VpcInterface.define({
vpcInterfaceName: 'bridge-interface',
role: role,
securityGroups: [securityGroup],
subnet: subnet,
});
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.gatewayBridge({
bridge: bridge,
vpcInterface: vpcInterface,
}),
vpcInterfaces: [vpcInterface],
});
# stack: Stack
# bridge: Bridge
# role: iam.IRole
# security_group: ec2.ISecurityGroup
# subnet: ec2.ISubnet
vpc_interface = VpcInterface.define(
vpc_interface_name="bridge-interface",
role=role,
security_groups=[security_group],
subnet=subnet
)
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.gateway_bridge(
bridge=bridge,
vpc_interface=vpc_interface
),
vpc_interfaces=[vpc_interface]
)
Stack stack;
Bridge bridge;
IRole role;
ISecurityGroup securityGroup;
ISubnet subnet;
VpcInterfaceConfig vpcInterface = VpcInterface.define(VpcInterfaceDefineProps.builder()
.vpcInterfaceName("bridge-interface")
.role(role)
.securityGroups(List.of(securityGroup))
.subnet(subnet)
.build());
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.gatewayBridge(GatewayBridgeSource.builder()
.bridge(bridge)
.vpcInterface(vpcInterface)
.build()))
.vpcInterfaces(List.of(vpcInterface))
.build();
Stack stack;
Bridge bridge;
IRole role;
ISecurityGroup securityGroup;
ISubnet subnet;
var vpcInterface = VpcInterface.Define(new VpcInterfaceDefineProps {
VpcInterfaceName = "bridge-interface",
Role = role,
SecurityGroups = new [] { securityGroup },
Subnet = subnet
});
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.GatewayBridge(new GatewayBridgeSource {
Bridge = bridge,
VpcInterface = vpcInterface
}),
VpcInterfaces = new [] { vpcInterface }
});
var stack Stack
var bridge Bridge
var role IRole
var securityGroup ISecurityGroup
var subnet ISubnet
vpcInterface := awsmediaconnectalpha.VpcInterface_Define(&VpcInterfaceDefineProps{
VpcInterfaceName: jsii.String("bridge-interface"),
Role: role,
SecurityGroups: []ISecurityGroup{
securityGroup,
},
Subnet: subnet,
})
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_GatewayBridge(&GatewayBridgeSource{
Bridge: bridge,
VpcInterface: vpcInterface,
}),
VpcInterfaces: []VpcInterfaceConfig{
vpcInterface,
},
})
VPC Interfaces
VPC interfaces allow MediaConnect to send or receive content within your VPC. Create VPC interfaces using VpcInterface.define() and add them to the flow's vpcInterfaces array. The same interface can then be referenced in sources and outputs:
declare const stack: Stack;
declare const role: iam.IRole;
declare const securityGroup: ec2.ISecurityGroup;
declare const subnet: ec2.ISubnet;
// Create VPC interface
const vpcInterface = VpcInterface.define({
vpcInterfaceName: 'my-vpc-interface',
role: role,
securityGroups: [securityGroup],
subnet: subnet,
networkInterfaceType: NetworkInterface.ENA,
});
// Add to flow and reference in source
const flow = new Flow(stack, 'MyFlow', {
vpcInterfaces: [vpcInterface], // Declare at flow level
source: SourceConfiguration.rist({
flowSourceName: 'vpc-source',
port: 5000,
maxLatency: Duration.millis(2000),
network: NetworkConfiguration.vpc(vpcInterface), // Reference in source
}),
});
# stack: Stack
# role: iam.IRole
# security_group: ec2.ISecurityGroup
# subnet: ec2.ISubnet
# Create VPC interface
vpc_interface = VpcInterface.define(
vpc_interface_name="my-vpc-interface",
role=role,
security_groups=[security_group],
subnet=subnet,
network_interface_type=NetworkInterface.ENA
)
# Add to flow and reference in source
flow = Flow(stack, "MyFlow",
vpc_interfaces=[vpc_interface], # Declare at flow level
source=SourceConfiguration.rist(
flow_source_name="vpc-source",
port=5000,
max_latency=Duration.millis(2000),
network=NetworkConfiguration.vpc(vpc_interface)
)
)
Stack stack;
IRole role;
ISecurityGroup securityGroup;
ISubnet subnet;
// Create VPC interface
VpcInterfaceConfig vpcInterface = VpcInterface.define(VpcInterfaceDefineProps.builder()
.vpcInterfaceName("my-vpc-interface")
.role(role)
.securityGroups(List.of(securityGroup))
.subnet(subnet)
.networkInterfaceType(NetworkInterface.ENA)
.build());
// Add to flow and reference in source
Flow flow = Flow.Builder.create(stack, "MyFlow")
.vpcInterfaces(List.of(vpcInterface)) // Declare at flow level
.source(SourceConfiguration.rist(SourceRist.builder()
.flowSourceName("vpc-source")
.port(5000)
.maxLatency(Duration.millis(2000))
.network(NetworkConfiguration.vpc(vpcInterface))
.build()))
.build();
Stack stack;
IRole role;
ISecurityGroup securityGroup;
ISubnet subnet;
// Create VPC interface
var vpcInterface = VpcInterface.Define(new VpcInterfaceDefineProps {
VpcInterfaceName = "my-vpc-interface",
Role = role,
SecurityGroups = new [] { securityGroup },
Subnet = subnet,
NetworkInterfaceType = NetworkInterface.ENA
});
// Add to flow and reference in source
var flow = new Flow(stack, "MyFlow", new FlowProps {
VpcInterfaces = new [] { vpcInterface }, // Declare at flow level
Source = SourceConfiguration.Rist(new SourceRist {
FlowSourceName = "vpc-source",
Port = 5000,
MaxLatency = Duration.Millis(2000),
Network = NetworkConfiguration.Vpc(vpcInterface)
})
});
var stack Stack
var role IRole
var securityGroup ISecurityGroup
var subnet ISubnet
// Create VPC interface
vpcInterface := awsmediaconnectalpha.VpcInterface_Define(&VpcInterfaceDefineProps{
VpcInterfaceName: jsii.String("my-vpc-interface"),
Role: role,
SecurityGroups: []ISecurityGroup{
securityGroup,
},
Subnet: subnet,
NetworkInterfaceType: awsmediaconnectalpha.NetworkInterface_ENA(),
})
// Add to flow and reference in source
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
VpcInterfaces: []VpcInterfaceConfig{
vpcInterface,
},
// Declare at flow level
Source: awsmediaconnectalpha.SourceConfiguration_Rist(&SourceRist{
FlowSourceName: jsii.String("vpc-source"),
Port: jsii.Number(5000),
MaxLatency: awscdk.Duration_Millis(jsii.Number(2000)),
Network: awsmediaconnectalpha.NetworkConfiguration_Vpc(vpcInterface),
}),
})
CDI and JPEG XS with EFA Interfaces
For high-performance CDI or JPEG XS workflows, use EFA (Elastic Fabric Adapter) interfaces. Note that flows can have a maximum of 1 EFA interface:
declare const stack: Stack;
declare const role: iam.IRole;
declare const securityGroup: ec2.ISecurityGroup;
declare const subnet: ec2.ISubnet;
const efaInterface = VpcInterface.define({
vpcInterfaceName: 'efa-interface',
role: role,
securityGroups: [securityGroup],
subnet: subnet,
networkInterfaceType: NetworkInterface.EFA, // Required for CDI
});
const videoStream = MediaStream.video({
mediaStreamId: 1,
mediaStreamName: 'video',
videoFormat: MediaVideoFormat.HD_1080P,
fmtp: {
exactFramerate: Framerate.FPS_29_97,
par: PixelAspectRatio.SQUARE,
},
});
const flow = new Flow(stack, 'MyCdiFlow', {
flowSize: FlowSize.LARGE_4X, // Required for CDI and JPEG XS
vpcInterfaces: [efaInterface],
mediaStreams: [videoStream],
source: SourceConfiguration.cdi({
flowSourceName: 'cdi-source',
vpcInterface: efaInterface,
port: 5000,
maxSyncBuffer: 100,
mediaStreamSourceConfigurations: [{
encoding: Encoding.RAW,
mediaStream: videoStream,
}],
}),
});
from aws_cdk.aws_mediaconnect_alpha import FmtpVideo, MediaStreamSourceConfigurationCdi
# stack: Stack
# role: iam.IRole
# security_group: ec2.ISecurityGroup
# subnet: ec2.ISubnet
efa_interface = VpcInterface.define(
vpc_interface_name="efa-interface",
role=role,
security_groups=[security_group],
subnet=subnet,
network_interface_type=NetworkInterface.EFA
)
video_stream = MediaStream.video(
media_stream_id=1,
media_stream_name="video",
video_format=MediaVideoFormat.HD_1080P,
fmtp=FmtpVideo(
exact_framerate=Framerate.FPS_29_97,
par=PixelAspectRatio.SQUARE
)
)
flow = Flow(stack, "MyCdiFlow",
flow_size=FlowSize.LARGE_4X, # Required for CDI and JPEG XS
vpc_interfaces=[efa_interface],
media_streams=[video_stream],
source=SourceConfiguration.cdi(
flow_source_name="cdi-source",
vpc_interface=efa_interface,
port=5000,
max_sync_buffer=100,
media_stream_source_configurations=[MediaStreamSourceConfigurationCdi(
encoding=Encoding.RAW,
media_stream=video_stream
)]
)
)
Stack stack;
IRole role;
ISecurityGroup securityGroup;
ISubnet subnet;
VpcInterfaceConfig efaInterface = VpcInterface.define(VpcInterfaceDefineProps.builder()
.vpcInterfaceName("efa-interface")
.role(role)
.securityGroups(List.of(securityGroup))
.subnet(subnet)
.networkInterfaceType(NetworkInterface.EFA)
.build());
MediaStream videoStream = MediaStream.video(MediaStreamVideo.builder()
.mediaStreamId(1)
.mediaStreamName("video")
.videoFormat(MediaVideoFormat.HD_1080P)
.fmtp(FmtpVideo.builder()
.exactFramerate(Framerate.FPS_29_97)
.par(PixelAspectRatio.SQUARE)
.build())
.build());
Flow flow = Flow.Builder.create(stack, "MyCdiFlow")
.flowSize(FlowSize.LARGE_4X) // Required for CDI and JPEG XS
.vpcInterfaces(List.of(efaInterface))
.mediaStreams(List.of(videoStream))
.source(SourceConfiguration.cdi(SourceCdi.builder()
.flowSourceName("cdi-source")
.vpcInterface(efaInterface)
.port(5000)
.maxSyncBuffer(100)
.mediaStreamSourceConfigurations(List.of(MediaStreamSourceConfigurationCdi.builder()
.encoding(Encoding.RAW)
.mediaStream(videoStream)
.build()))
.build()))
.build();
Stack stack;
IRole role;
ISecurityGroup securityGroup;
ISubnet subnet;
var efaInterface = VpcInterface.Define(new VpcInterfaceDefineProps {
VpcInterfaceName = "efa-interface",
Role = role,
SecurityGroups = new [] { securityGroup },
Subnet = subnet,
NetworkInterfaceType = NetworkInterface.EFA
});
var videoStream = MediaStream.Video(new MediaStreamVideo {
MediaStreamId = 1,
MediaStreamName = "video",
VideoFormat = MediaVideoFormat.HD_1080P,
Fmtp = new FmtpVideo {
ExactFramerate = Framerate.FPS_29_97,
Par = PixelAspectRatio.SQUARE
}
});
var flow = new Flow(stack, "MyCdiFlow", new FlowProps {
FlowSize = FlowSize.LARGE_4X, // Required for CDI and JPEG XS
VpcInterfaces = new [] { efaInterface },
MediaStreams = new [] { videoStream },
Source = SourceConfiguration.Cdi(new SourceCdi {
FlowSourceName = "cdi-source",
VpcInterface = efaInterface,
Port = 5000,
MaxSyncBuffer = 100,
MediaStreamSourceConfigurations = new [] { new MediaStreamSourceConfigurationCdi {
Encoding = Encoding.RAW,
MediaStream = videoStream
} }
})
});
var stack Stack
var role IRole
var securityGroup ISecurityGroup
var subnet ISubnet
efaInterface := awsmediaconnectalpha.VpcInterface_Define(&VpcInterfaceDefineProps{
VpcInterfaceName: jsii.String("efa-interface"),
Role: role,
SecurityGroups: []ISecurityGroup{
securityGroup,
},
Subnet: subnet,
NetworkInterfaceType: awsmediaconnectalpha.NetworkInterface_EFA(),
})
videoStream := awsmediaconnectalpha.MediaStream_Video(&MediaStreamVideo{
MediaStreamId: jsii.Number(1),
MediaStreamName: jsii.String("video"),
VideoFormat: awsmediaconnectalpha.MediaVideoFormat_HD_1080P(),
Fmtp: &FmtpVideo{
ExactFramerate: awsmediaconnectalpha.Framerate_FPS_29_97(),
Par: awsmediaconnectalpha.PixelAspectRatio_SQUARE(),
},
})
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyCdiFlow"), &FlowProps{
FlowSize: awsmediaconnectalpha.FlowSize_LARGE_4X(),
// Required for CDI and JPEG XS
VpcInterfaces: []VpcInterfaceConfig{
efaInterface,
},
MediaStreams: []MediaStream{
videoStream,
},
Source: awsmediaconnectalpha.SourceConfiguration_Cdi(&SourceCdi{
FlowSourceName: jsii.String("cdi-source"),
VpcInterface: efaInterface,
Port: jsii.Number(5000),
MaxSyncBuffer: jsii.Number(100),
MediaStreamSourceConfigurations: []MediaStreamSourceConfigurationCdi{
&MediaStreamSourceConfigurationCdi{
Encoding: awsmediaconnectalpha.Encoding_RAW(),
MediaStream: videoStream,
},
},
}),
})
JPEG XS with Redundant Interfaces
JPEG XS requires exactly 2 input interfaces per media stream for redundancy. Typically one EFA and one ENA interface:
declare const stack: Stack;
declare const role: iam.IRole;
declare const sg1: ec2.ISecurityGroup;
declare const sg2: ec2.ISecurityGroup;
declare const subnet: ec2.ISubnet;
const efaInterface = VpcInterface.define({
vpcInterfaceName: 'efa-interface',
role: role,
securityGroups: [sg1],
subnet: subnet,
networkInterfaceType: NetworkInterface.EFA,
});
const enaInterface = VpcInterface.define({
vpcInterfaceName: 'ena-interface',
role: role,
securityGroups: [sg2],
subnet: subnet,
networkInterfaceType: NetworkInterface.ENA,
});
const videoStream = MediaStream.video({
mediaStreamId: 1,
mediaStreamName: 'video',
videoFormat: MediaVideoFormat.UHD_2160P,
fmtp: {
exactFramerate: Framerate.FPS_59_94,
par: PixelAspectRatio.SQUARE,
colorimetry: Colorimetry.BT2020,
videoRange: VideoRange.FULL,
scanMode: ScanMode.PROGRESSIVE,
tcs: Tcs.PQ,
},
});
const flow = new Flow(stack, 'MyJpegXsFlow', {
flowSize: FlowSize.LARGE_4X, // Required for JPEG XS
vpcInterfaces: [efaInterface, enaInterface],
mediaStreams: [videoStream],
source: SourceConfiguration.jpegXs({
flowSourceName: 'jpegxs-source',
maxSyncBuffer: 100,
mediaStreamSourceConfigurations: [{
encoding: Encoding.JXSV,
port: 5000,
inputInterface: [efaInterface, enaInterface], // 2 interfaces for redundancy
mediaStream: videoStream,
}],
}),
});
from aws_cdk.aws_mediaconnect_alpha import FmtpVideo, MediaStreamSourceConfigurationJpegXs
# stack: Stack
# role: iam.IRole
# sg1: ec2.ISecurityGroup
# sg2: ec2.ISecurityGroup
# subnet: ec2.ISubnet
efa_interface = VpcInterface.define(
vpc_interface_name="efa-interface",
role=role,
security_groups=[sg1],
subnet=subnet,
network_interface_type=NetworkInterface.EFA
)
ena_interface = VpcInterface.define(
vpc_interface_name="ena-interface",
role=role,
security_groups=[sg2],
subnet=subnet,
network_interface_type=NetworkInterface.ENA
)
video_stream = MediaStream.video(
media_stream_id=1,
media_stream_name="video",
video_format=MediaVideoFormat.UHD_2160P,
fmtp=FmtpVideo(
exact_framerate=Framerate.FPS_59_94,
par=PixelAspectRatio.SQUARE,
colorimetry=Colorimetry.BT2020,
video_range=VideoRange.FULL,
scan_mode=ScanMode.PROGRESSIVE,
tcs=Tcs.PQ
)
)
flow = Flow(stack, "MyJpegXsFlow",
flow_size=FlowSize.LARGE_4X, # Required for JPEG XS
vpc_interfaces=[efa_interface, ena_interface],
media_streams=[video_stream],
source=SourceConfiguration.jpeg_xs(
flow_source_name="jpegxs-source",
max_sync_buffer=100,
media_stream_source_configurations=[MediaStreamSourceConfigurationJpegXs(
encoding=Encoding.JXSV,
port=5000,
input_interface=[efa_interface, ena_interface], # 2 interfaces for redundancy
media_stream=video_stream
)]
)
)
Stack stack;
IRole role;
ISecurityGroup sg1;
ISecurityGroup sg2;
ISubnet subnet;
VpcInterfaceConfig efaInterface = VpcInterface.define(VpcInterfaceDefineProps.builder()
.vpcInterfaceName("efa-interface")
.role(role)
.securityGroups(List.of(sg1))
.subnet(subnet)
.networkInterfaceType(NetworkInterface.EFA)
.build());
VpcInterfaceConfig enaInterface = VpcInterface.define(VpcInterfaceDefineProps.builder()
.vpcInterfaceName("ena-interface")
.role(role)
.securityGroups(List.of(sg2))
.subnet(subnet)
.networkInterfaceType(NetworkInterface.ENA)
.build());
MediaStream videoStream = MediaStream.video(MediaStreamVideo.builder()
.mediaStreamId(1)
.mediaStreamName("video")
.videoFormat(MediaVideoFormat.UHD_2160P)
.fmtp(FmtpVideo.builder()
.exactFramerate(Framerate.FPS_59_94)
.par(PixelAspectRatio.SQUARE)
.colorimetry(Colorimetry.BT2020)
.videoRange(VideoRange.FULL)
.scanMode(ScanMode.PROGRESSIVE)
.tcs(Tcs.PQ)
.build())
.build());
Flow flow = Flow.Builder.create(stack, "MyJpegXsFlow")
.flowSize(FlowSize.LARGE_4X) // Required for JPEG XS
.vpcInterfaces(List.of(efaInterface, enaInterface))
.mediaStreams(List.of(videoStream))
.source(SourceConfiguration.jpegXs(SourceJpegXs.builder()
.flowSourceName("jpegxs-source")
.maxSyncBuffer(100)
.mediaStreamSourceConfigurations(List.of(MediaStreamSourceConfigurationJpegXs.builder()
.encoding(Encoding.JXSV)
.port(5000)
.inputInterface(List.of(efaInterface, enaInterface)) // 2 interfaces for redundancy
.mediaStream(videoStream)
.build()))
.build()))
.build();
Stack stack;
IRole role;
ISecurityGroup sg1;
ISecurityGroup sg2;
ISubnet subnet;
var efaInterface = VpcInterface.Define(new VpcInterfaceDefineProps {
VpcInterfaceName = "efa-interface",
Role = role,
SecurityGroups = new [] { sg1 },
Subnet = subnet,
NetworkInterfaceType = NetworkInterface.EFA
});
var enaInterface = VpcInterface.Define(new VpcInterfaceDefineProps {
VpcInterfaceName = "ena-interface",
Role = role,
SecurityGroups = new [] { sg2 },
Subnet = subnet,
NetworkInterfaceType = NetworkInterface.ENA
});
var videoStream = MediaStream.Video(new MediaStreamVideo {
MediaStreamId = 1,
MediaStreamName = "video",
VideoFormat = MediaVideoFormat.UHD_2160P,
Fmtp = new FmtpVideo {
ExactFramerate = Framerate.FPS_59_94,
Par = PixelAspectRatio.SQUARE,
Colorimetry = Colorimetry.BT2020,
VideoRange = VideoRange.FULL,
ScanMode = ScanMode.PROGRESSIVE,
Tcs = Tcs.PQ
}
});
var flow = new Flow(stack, "MyJpegXsFlow", new FlowProps {
FlowSize = FlowSize.LARGE_4X, // Required for JPEG XS
VpcInterfaces = new [] { efaInterface, enaInterface },
MediaStreams = new [] { videoStream },
Source = SourceConfiguration.JpegXs(new SourceJpegXs {
FlowSourceName = "jpegxs-source",
MaxSyncBuffer = 100,
MediaStreamSourceConfigurations = new [] { new MediaStreamSourceConfigurationJpegXs {
Encoding = Encoding.JXSV,
Port = 5000,
InputInterface = new [] { efaInterface, enaInterface }, // 2 interfaces for redundancy
MediaStream = videoStream
} }
})
});
var stack Stack
var role IRole
var sg1 ISecurityGroup
var sg2 ISecurityGroup
var subnet ISubnet
efaInterface := awsmediaconnectalpha.VpcInterface_Define(&VpcInterfaceDefineProps{
VpcInterfaceName: jsii.String("efa-interface"),
Role: role,
SecurityGroups: []ISecurityGroup{
sg1,
},
Subnet: subnet,
NetworkInterfaceType: awsmediaconnectalpha.NetworkInterface_EFA(),
})
enaInterface := awsmediaconnectalpha.VpcInterface_Define(&VpcInterfaceDefineProps{
VpcInterfaceName: jsii.String("ena-interface"),
Role: role,
SecurityGroups: []ISecurityGroup{
sg2,
},
Subnet: subnet,
NetworkInterfaceType: awsmediaconnectalpha.NetworkInterface_ENA(),
})
videoStream := awsmediaconnectalpha.MediaStream_Video(&MediaStreamVideo{
MediaStreamId: jsii.Number(1),
MediaStreamName: jsii.String("video"),
VideoFormat: awsmediaconnectalpha.MediaVideoFormat_UHD_2160P(),
Fmtp: &FmtpVideo{
ExactFramerate: awsmediaconnectalpha.Framerate_FPS_59_94(),
Par: awsmediaconnectalpha.PixelAspectRatio_SQUARE(),
Colorimetry: awsmediaconnectalpha.Colorimetry_BT2020(),
VideoRange: awsmediaconnectalpha.VideoRange_FULL(),
ScanMode: awsmediaconnectalpha.ScanMode_PROGRESSIVE(),
Tcs: awsmediaconnectalpha.Tcs_PQ(),
},
})
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyJpegXsFlow"), &FlowProps{
FlowSize: awsmediaconnectalpha.FlowSize_LARGE_4X(),
// Required for JPEG XS
VpcInterfaces: []VpcInterfaceConfig{
efaInterface,
enaInterface,
},
MediaStreams: []MediaStream{
videoStream,
},
Source: awsmediaconnectalpha.SourceConfiguration_JpegXs(&SourceJpegXs{
FlowSourceName: jsii.String("jpegxs-source"),
MaxSyncBuffer: jsii.Number(100),
MediaStreamSourceConfigurations: []MediaStreamSourceConfigurationJpegXs{
&MediaStreamSourceConfigurationJpegXs{
Encoding: awsmediaconnectalpha.Encoding_JXSV(),
Port: jsii.Number(5000),
InputInterface: []VpcInterfaceConfig{
efaInterface,
enaInterface,
},
// 2 interfaces for redundancy
MediaStream: videoStream,
},
},
}),
})
Media Streams
Media streams represent individual components of your content (video, audio, ancillary data) for ST 2110 JPEG XS or CDI workflows. Create media streams using the static factory methods and add them to the flow's mediaStreams array:
declare const stack: Stack;
// Create media streams
const videoStream = MediaStream.video({
mediaStreamId: 1,
mediaStreamName: 'video-stream',
videoFormat: MediaVideoFormat.HD_1080P,
fmtp: {
colorimetry: Colorimetry.BT709,
exactFramerate: Framerate.FPS_29_97,
par: PixelAspectRatio.SQUARE,
videoRange: VideoRange.NARROW,
scanMode: ScanMode.PROGRESSIVE,
tcs: Tcs.SDR,
},
});
const audioStream = MediaStream.audio({
mediaStreamId: 2,
mediaStreamName: 'audio-stream',
channelOrder: AudioStreamOrderOptions.STANDARD_STEREO,
});
// Add to flow
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.router(),
mediaStreams: [videoStream, audioStream], // Declare at flow level
});
from aws_cdk.aws_mediaconnect_alpha import FmtpVideo
# stack: Stack
# Create media streams
video_stream = MediaStream.video(
media_stream_id=1,
media_stream_name="video-stream",
video_format=MediaVideoFormat.HD_1080P,
fmtp=FmtpVideo(
colorimetry=Colorimetry.BT709,
exact_framerate=Framerate.FPS_29_97,
par=PixelAspectRatio.SQUARE,
video_range=VideoRange.NARROW,
scan_mode=ScanMode.PROGRESSIVE,
tcs=Tcs.SDR
)
)
audio_stream = MediaStream.audio(
media_stream_id=2,
media_stream_name="audio-stream",
channel_order=AudioStreamOrderOptions.STANDARD_STEREO
)
# Add to flow
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.router(),
media_streams=[video_stream, audio_stream]
)
Stack stack;
// Create media streams
MediaStream videoStream = MediaStream.video(MediaStreamVideo.builder()
.mediaStreamId(1)
.mediaStreamName("video-stream")
.videoFormat(MediaVideoFormat.HD_1080P)
.fmtp(FmtpVideo.builder()
.colorimetry(Colorimetry.BT709)
.exactFramerate(Framerate.FPS_29_97)
.par(PixelAspectRatio.SQUARE)
.videoRange(VideoRange.NARROW)
.scanMode(ScanMode.PROGRESSIVE)
.tcs(Tcs.SDR)
.build())
.build());
MediaStream audioStream = MediaStream.audio(MediaStreamAudio.builder()
.mediaStreamId(2)
.mediaStreamName("audio-stream")
.channelOrder(AudioStreamOrderOptions.STANDARD_STEREO)
.build());
// Add to flow
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.router())
.mediaStreams(List.of(videoStream, audioStream))
.build();
Stack stack;
// Create media streams
var videoStream = MediaStream.Video(new MediaStreamVideo {
MediaStreamId = 1,
MediaStreamName = "video-stream",
VideoFormat = MediaVideoFormat.HD_1080P,
Fmtp = new FmtpVideo {
Colorimetry = Colorimetry.BT709,
ExactFramerate = Framerate.FPS_29_97,
Par = PixelAspectRatio.SQUARE,
VideoRange = VideoRange.NARROW,
ScanMode = ScanMode.PROGRESSIVE,
Tcs = Tcs.SDR
}
});
var audioStream = MediaStream.Audio(new MediaStreamAudio {
MediaStreamId = 2,
MediaStreamName = "audio-stream",
ChannelOrder = AudioStreamOrderOptions.STANDARD_STEREO
});
// Add to flow
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.Router(),
MediaStreams = new [] { videoStream, audioStream }
});
var stack Stack
// Create media streams
videoStream := awsmediaconnectalpha.MediaStream_Video(&MediaStreamVideo{
MediaStreamId: jsii.Number(1),
MediaStreamName: jsii.String("video-stream"),
VideoFormat: awsmediaconnectalpha.MediaVideoFormat_HD_1080P(),
Fmtp: &FmtpVideo{
Colorimetry: awsmediaconnectalpha.Colorimetry_BT709(),
ExactFramerate: awsmediaconnectalpha.Framerate_FPS_29_97(),
Par: awsmediaconnectalpha.PixelAspectRatio_SQUARE(),
VideoRange: awsmediaconnectalpha.VideoRange_NARROW(),
ScanMode: awsmediaconnectalpha.ScanMode_PROGRESSIVE(),
Tcs: awsmediaconnectalpha.Tcs_SDR(),
},
})
audioStream := awsmediaconnectalpha.MediaStream_Audio(&MediaStreamAudio{
MediaStreamId: jsii.Number(2),
MediaStreamName: jsii.String("audio-stream"),
ChannelOrder: awsmediaconnectalpha.AudioStreamOrderOptions_STANDARD_STEREO(),
})
// Add to flow
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_Router(),
MediaStreams: []MediaStream{
videoStream,
audioStream,
},
})
Audio Channel Order
For audio media streams, use the AudioStreamOrderOptions enum to specify the SMPTE 2110-30 channel order:
// Available channel order options
AudioStreamOrderOptions.MONO // SMPTE2110.(M)
AudioStreamOrderOptions.DUAL_MONO // SMPTE2110.(DM)
AudioStreamOrderOptions.STANDARD_STEREO // SMPTE2110.(ST)
AudioStreamOrderOptions.LTRT_MATRIX_STEREO // SMPTE2110.(LtRt)
AudioStreamOrderOptions.SURROUND_5_1 // SMPTE2110.(51)
AudioStreamOrderOptions.SURROUND_7_1 // SMPTE2110.(71)
AudioStreamOrderOptions.SURROUND_22_2 // SMPTE2110.(222)
AudioStreamOrderOptions.ONE_SDI_AUDIO_GROUP // SMPTE2110.(SGRP)
// Example with 5.1 surround
const surroundAudio = MediaStream.audio({
mediaStreamId: 3,
mediaStreamName: 'surround-audio',
channelOrder: AudioStreamOrderOptions.SURROUND_5_1,
});
# Available channel order options
AudioStreamOrderOptions.MONO # SMPTE2110.(M)
AudioStreamOrderOptions.DUAL_MONO # SMPTE2110.(DM)
AudioStreamOrderOptions.STANDARD_STEREO # SMPTE2110.(ST)
AudioStreamOrderOptions.LTRT_MATRIX_STEREO # SMPTE2110.(LtRt)
AudioStreamOrderOptions.SURROUND_5_1 # SMPTE2110.(51)
AudioStreamOrderOptions.SURROUND_7_1 # SMPTE2110.(71)
AudioStreamOrderOptions.SURROUND_22_2 # SMPTE2110.(222)
AudioStreamOrderOptions.ONE_SDI_AUDIO_GROUP # SMPTE2110.(SGRP)
# Example with 5.1 surround
surround_audio = MediaStream.audio(
media_stream_id=3,
media_stream_name="surround-audio",
channel_order=AudioStreamOrderOptions.SURROUND_5_1
)
// Available channel order options
AudioStreamOrderOptions.MONO; // SMPTE2110.(M)
AudioStreamOrderOptions.DUAL_MONO; // SMPTE2110.(DM)
AudioStreamOrderOptions.STANDARD_STEREO; // SMPTE2110.(ST)
AudioStreamOrderOptions.LTRT_MATRIX_STEREO; // SMPTE2110.(LtRt)
AudioStreamOrderOptions.SURROUND_5_1; // SMPTE2110.(51)
AudioStreamOrderOptions.SURROUND_7_1; // SMPTE2110.(71)
AudioStreamOrderOptions.SURROUND_22_2; // SMPTE2110.(222)
AudioStreamOrderOptions.ONE_SDI_AUDIO_GROUP; // SMPTE2110.(SGRP)
// Example with 5.1 surround
MediaStream surroundAudio = MediaStream.audio(MediaStreamAudio.builder()
.mediaStreamId(3)
.mediaStreamName("surround-audio")
.channelOrder(AudioStreamOrderOptions.SURROUND_5_1)
.build());
// Available channel order options
AudioStreamOrderOptions.MONO; // SMPTE2110.(M)
AudioStreamOrderOptions.DUAL_MONO; // SMPTE2110.(DM)
AudioStreamOrderOptions.STANDARD_STEREO; // SMPTE2110.(ST)
AudioStreamOrderOptions.LTRT_MATRIX_STEREO; // SMPTE2110.(LtRt)
AudioStreamOrderOptions.SURROUND_5_1; // SMPTE2110.(51)
AudioStreamOrderOptions.SURROUND_7_1; // SMPTE2110.(71)
AudioStreamOrderOptions.SURROUND_22_2; // SMPTE2110.(222)
AudioStreamOrderOptions.ONE_SDI_AUDIO_GROUP; // SMPTE2110.(SGRP)
// Example with 5.1 surround
var surroundAudio = MediaStream.Audio(new MediaStreamAudio {
MediaStreamId = 3,
MediaStreamName = "surround-audio",
ChannelOrder = AudioStreamOrderOptions.SURROUND_5_1
});
// Available channel order options
awsmediaconnectalpha.AudioStreamOrderOptions_MONO() // SMPTE2110.(M)
awsmediaconnectalpha.AudioStreamOrderOptions_DUAL_MONO() // SMPTE2110.(DM)
awsmediaconnectalpha.AudioStreamOrderOptions_STANDARD_STEREO() // SMPTE2110.(ST)
awsmediaconnectalpha.AudioStreamOrderOptions_LTRT_MATRIX_STEREO() // SMPTE2110.(LtRt)
awsmediaconnectalpha.AudioStreamOrderOptions_SURROUND_5_1() // SMPTE2110.(51)
awsmediaconnectalpha.AudioStreamOrderOptions_SURROUND_7_1() // SMPTE2110.(71)
awsmediaconnectalpha.AudioStreamOrderOptions_SURROUND_22_2() // SMPTE2110.(222)
awsmediaconnectalpha.AudioStreamOrderOptions_ONE_SDI_AUDIO_GROUP() // SMPTE2110.(SGRP)
// Example with 5.1 surround
surroundAudio := awsmediaconnectalpha.MediaStream_Audio(&MediaStreamAudio{
MediaStreamId: jsii.Number(3),
MediaStreamName: jsii.String("surround-audio"),
ChannelOrder: awsmediaconnectalpha.AudioStreamOrderOptions_SURROUND_5_1(),
})
Media streams can be referenced in source configurations (for CDI and JPEG XS) and output configurations.
Flow Sizes
MediaConnect offers three flow sizes that determine feature support:
| Flow Size | Transport Streams | NDI | CDI / JPEG XS |
|---|---|---|---|
MEDIUM (default) | ✅ | ❌ | ❌ |
LARGE | ✅ | ✅ | ❌ |
LARGE_4X | ❌ | ❌ | ✅ |
This table maps each FlowSize to the capabilities the construct validates. For output counts, throughput limits, and other per-size details, see Flow sizes and capabilities.
The construct validates flow size constraints at synthesis time based on the source protocol and NDI configuration:
MEDIUMsupports transport stream protocols (RTP, SRT, RIST, etc.) but not NDI or CDILARGEsupports transport streams and NDI, and is required when NDI is enabledLARGE_4Xis required for CDI and JPEG XS protocols, and does not support transport streams or NDI
These are mutually exclusive — CDI/JPEG XS and NDI cannot coexist on the same flow because they require different flow sizes.
declare const stack: Stack;
declare const ndiVpcInterface: VpcInterfaceConfig;
declare const efaInterface: VpcInterfaceConfig;
declare const videoStream: MediaStream;
// NDI requires LARGE, an encoding profile, and at least one discovery server
new Flow(stack, 'NdiFlow', {
flowSize: FlowSize.LARGE,
ndiConfig: {
ndiState: State.ENABLED,
ndiDiscoveryServers: [{
discoveryServerAddress: '10.0.0.10',
vpcInterface: ndiVpcInterface,
}],
},
encodingConfig: {
encodingProfile: EncodingProfile.CONTRIBUTION_H264_DEFAULT,
},
source: SourceConfiguration.ndi({
flowSourceName: 'ndi-source',
}),
});
// CDI and JPEG XS require LARGE_4X
new Flow(stack, 'CdiFlow', {
flowSize: FlowSize.LARGE_4X,
vpcInterfaces: [efaInterface],
mediaStreams: [videoStream],
source: SourceConfiguration.cdi({
flowSourceName: 'cdi-source',
vpcInterface: efaInterface,
port: 5000,
maxSyncBuffer: 100,
mediaStreamSourceConfigurations: [{
encoding: Encoding.RAW,
mediaStream: videoStream,
}],
}),
});
from aws_cdk.aws_mediaconnect_alpha import NdiConfig, NdiDiscoveryServerConfig, EncodingConfig, MediaStreamSourceConfigurationCdi
# stack: Stack
# ndi_vpc_interface: VpcInterfaceConfig
# efa_interface: VpcInterfaceConfig
# video_stream: MediaStream
# NDI requires LARGE, an encoding profile, and at least one discovery server
Flow(stack, "NdiFlow",
flow_size=FlowSize.LARGE,
ndi_config=NdiConfig(
ndi_state=State.ENABLED,
ndi_discovery_servers=[NdiDiscoveryServerConfig(
discovery_server_address="10.0.0.10",
vpc_interface=ndi_vpc_interface
)]
),
encoding_config=EncodingConfig(
encoding_profile=EncodingProfile.CONTRIBUTION_H264_DEFAULT
),
source=SourceConfiguration.ndi(
flow_source_name="ndi-source"
)
)
# CDI and JPEG XS require LARGE_4X
Flow(stack, "CdiFlow",
flow_size=FlowSize.LARGE_4X,
vpc_interfaces=[efa_interface],
media_streams=[video_stream],
source=SourceConfiguration.cdi(
flow_source_name="cdi-source",
vpc_interface=efa_interface,
port=5000,
max_sync_buffer=100,
media_stream_source_configurations=[MediaStreamSourceConfigurationCdi(
encoding=Encoding.RAW,
media_stream=video_stream
)]
)
)
Stack stack;
VpcInterfaceConfig ndiVpcInterface;
VpcInterfaceConfig efaInterface;
MediaStream videoStream;
// NDI requires LARGE, an encoding profile, and at least one discovery server
// NDI requires LARGE, an encoding profile, and at least one discovery server
Flow.Builder.create(stack, "NdiFlow")
.flowSize(FlowSize.LARGE)
.ndiConfig(NdiConfig.builder()
.ndiState(State.ENABLED)
.ndiDiscoveryServers(List.of(NdiDiscoveryServerConfig.builder()
.discoveryServerAddress("10.0.0.10")
.vpcInterface(ndiVpcInterface)
.build()))
.build())
.encodingConfig(EncodingConfig.builder()
.encodingProfile(EncodingProfile.CONTRIBUTION_H264_DEFAULT)
.build())
.source(SourceConfiguration.ndi(SourceNdi.builder()
.flowSourceName("ndi-source")
.build()))
.build();
// CDI and JPEG XS require LARGE_4X
// CDI and JPEG XS require LARGE_4X
Flow.Builder.create(stack, "CdiFlow")
.flowSize(FlowSize.LARGE_4X)
.vpcInterfaces(List.of(efaInterface))
.mediaStreams(List.of(videoStream))
.source(SourceConfiguration.cdi(SourceCdi.builder()
.flowSourceName("cdi-source")
.vpcInterface(efaInterface)
.port(5000)
.maxSyncBuffer(100)
.mediaStreamSourceConfigurations(List.of(MediaStreamSourceConfigurationCdi.builder()
.encoding(Encoding.RAW)
.mediaStream(videoStream)
.build()))
.build()))
.build();
Stack stack;
VpcInterfaceConfig ndiVpcInterface;
VpcInterfaceConfig efaInterface;
MediaStream videoStream;
// NDI requires LARGE, an encoding profile, and at least one discovery server
// NDI requires LARGE, an encoding profile, and at least one discovery server
new Flow(stack, "NdiFlow", new FlowProps {
FlowSize = FlowSize.LARGE,
NdiConfig = new NdiConfig {
NdiState = State.ENABLED,
NdiDiscoveryServers = new [] { new NdiDiscoveryServerConfig {
DiscoveryServerAddress = "10.0.0.10",
VpcInterface = ndiVpcInterface
} }
},
EncodingConfig = new EncodingConfig {
EncodingProfile = EncodingProfile.CONTRIBUTION_H264_DEFAULT
},
Source = SourceConfiguration.Ndi(new SourceNdi {
FlowSourceName = "ndi-source"
})
});
// CDI and JPEG XS require LARGE_4X
// CDI and JPEG XS require LARGE_4X
new Flow(stack, "CdiFlow", new FlowProps {
FlowSize = FlowSize.LARGE_4X,
VpcInterfaces = new [] { efaInterface },
MediaStreams = new [] { videoStream },
Source = SourceConfiguration.Cdi(new SourceCdi {
FlowSourceName = "cdi-source",
VpcInterface = efaInterface,
Port = 5000,
MaxSyncBuffer = 100,
MediaStreamSourceConfigurations = new [] { new MediaStreamSourceConfigurationCdi {
Encoding = Encoding.RAW,
MediaStream = videoStream
} }
})
});
var stack Stack
var ndiVpcInterface VpcInterfaceConfig
var efaInterface VpcInterfaceConfig
var videoStream MediaStream
// NDI requires LARGE, an encoding profile, and at least one discovery server
// NDI requires LARGE, an encoding profile, and at least one discovery server
awsmediaconnectalpha.NewFlow(stack, jsii.String("NdiFlow"), &FlowProps{
FlowSize: awsmediaconnectalpha.FlowSize_LARGE(),
NdiConfig: &NdiConfig{
NdiState: awsmediaconnectalpha.State_ENABLED,
NdiDiscoveryServers: []NdiDiscoveryServerConfig{
&NdiDiscoveryServerConfig{
DiscoveryServerAddress: jsii.String("10.0.0.10"),
VpcInterface: ndiVpcInterface,
},
},
},
EncodingConfig: &EncodingConfig{
EncodingProfile: awsmediaconnectalpha.EncodingProfile_CONTRIBUTION_H264_DEFAULT,
},
Source: awsmediaconnectalpha.SourceConfiguration_Ndi(&SourceNdi{
FlowSourceName: jsii.String("ndi-source"),
}),
})
// CDI and JPEG XS require LARGE_4X
// CDI and JPEG XS require LARGE_4X
awsmediaconnectalpha.NewFlow(stack, jsii.String("CdiFlow"), &FlowProps{
FlowSize: awsmediaconnectalpha.FlowSize_LARGE_4X(),
VpcInterfaces: []VpcInterfaceConfig{
efaInterface,
},
MediaStreams: []MediaStream{
videoStream,
},
Source: awsmediaconnectalpha.SourceConfiguration_Cdi(&SourceCdi{
FlowSourceName: jsii.String("cdi-source"),
VpcInterface: efaInterface,
Port: jsii.Number(5000),
MaxSyncBuffer: jsii.Number(100),
MediaStreamSourceConfigurations: []MediaStreamSourceConfigurationCdi{
&MediaStreamSourceConfigurationCdi{
Encoding: awsmediaconnectalpha.Encoding_RAW(),
MediaStream: videoStream,
},
},
}),
})
For more information, see Flow sizes and capabilities.
Gateways
MediaConnect Gateways enable the deployment of on-premises resources for transporting live video to and from the AWS Cloud. Gateways are required for creating bridges.
Creating a Gateway
declare const stack: Stack;
const productionNetwork = GatewayNetwork.define({
cidrBlock: '192.168.1.0/24',
name: 'production-network',
});
const gateway = new Gateway(stack, 'MyGateway', {
gatewayName: 'my-gateway',
egressCidrBlocks: ['10.0.0.0/16'],
networks: [productionNetwork],
});
# stack: Stack
production_network = GatewayNetwork.define(
cidr_block="192.168.1.0/24",
name="production-network"
)
gateway = Gateway(stack, "MyGateway",
gateway_name="my-gateway",
egress_cidr_blocks=["10.0.0.0/16"],
networks=[production_network]
)
Stack stack;
GatewayNetwork productionNetwork = GatewayNetwork.define(GatewayNetworkDefineProps.builder()
.cidrBlock("192.168.1.0/24")
.name("production-network")
.build());
Gateway gateway = Gateway.Builder.create(stack, "MyGateway")
.gatewayName("my-gateway")
.egressCidrBlocks(List.of("10.0.0.0/16"))
.networks(List.of(productionNetwork))
.build();
Stack stack;
var productionNetwork = GatewayNetwork.Define(new GatewayNetworkDefineProps {
CidrBlock = "192.168.1.0/24",
Name = "production-network"
});
var gateway = new Gateway(stack, "MyGateway", new GatewayProps {
GatewayName = "my-gateway",
EgressCidrBlocks = new [] { "10.0.0.0/16" },
Networks = new [] { productionNetwork }
});
var stack Stack
productionNetwork := awsmediaconnectalpha.GatewayNetwork_Define(&GatewayNetworkDefineProps{
CidrBlock: jsii.String("192.168.1.0/24"),
Name: jsii.String("production-network"),
})
gateway := awsmediaconnectalpha.NewGateway(stack, jsii.String("MyGateway"), &GatewayProps{
GatewayName: jsii.String("my-gateway"),
EgressCidrBlocks: []*string{
jsii.String("10.0.0.0/16"),
},
Networks: []GatewayNetwork{
productionNetwork,
},
})
Importing an Existing Gateway
declare const stack: Stack;
const gateway = Gateway.fromGatewayArn(stack, 'ImportedGateway',
'arn:aws:mediaconnect:us-west-2:123456789012:gateway:1-XXXXXX',
);
# stack: Stack
gateway = Gateway.from_gateway_arn(stack, "ImportedGateway", "arn:aws:mediaconnect:us-west-2:123456789012:gateway:1-XXXXXX")
Stack stack;
IGateway gateway = Gateway.fromGatewayArn(stack, "ImportedGateway", "arn:aws:mediaconnect:us-west-2:123456789012:gateway:1-XXXXXX");
Stack stack;
var gateway = Gateway.FromGatewayArn(stack, "ImportedGateway", "arn:aws:mediaconnect:us-west-2:123456789012:gateway:1-XXXXXX");
var stack Stack
gateway := awsmediaconnectalpha.Gateway_FromGatewayArn(stack, jsii.String("ImportedGateway"), jsii.String("arn:aws:mediaconnect:us-west-2:123456789012:gateway:1-XXXXXX"))
Bridges
MediaConnect bridges enable you to interconnect on-premises equipment with cloud-based workflows. Bridges support both ingress (on-premises to cloud) and egress (cloud to on-premises) scenarios.
Creating a Bridge
Ingress Bridge (On-premises to Cloud)
An ingress bridge receives content from on-premises equipment and makes it available in the cloud:
declare const stack: Stack;
const productionNetwork = GatewayNetwork.define({
cidrBlock: '192.168.1.0/24',
name: 'production-network',
});
const gateway = new Gateway(stack, 'MyGateway', {
gatewayName: 'my-gateway',
egressCidrBlocks: ['10.0.0.0/16'],
networks: [productionNetwork],
});
const ingressBridge = new Bridge(stack, 'MyIngressBridge', {
bridgeName: 'my-ingress-bridge',
config: BridgeConfiguration.ingress({
maxBitrate: Bitrate.mbps(10),
maxOutputs: 2,
networkSources: [{
name: 'on-prem-source',
source: {
protocol: BridgeProtocol.RTP,
network: productionNetwork,
multicastIp: '239.1.1.1',
port: 5000,
},
}],
}),
gateway: gateway,
});
from aws_cdk.aws_mediaconnect_alpha import BridgeNetworkInput, BridgeNetworkSource
# stack: Stack
production_network = GatewayNetwork.define(
cidr_block="192.168.1.0/24",
name="production-network"
)
gateway = Gateway(stack, "MyGateway",
gateway_name="my-gateway",
egress_cidr_blocks=["10.0.0.0/16"],
networks=[production_network]
)
ingress_bridge = Bridge(stack, "MyIngressBridge",
bridge_name="my-ingress-bridge",
config=BridgeConfiguration.ingress(
max_bitrate=Bitrate.mbps(10),
max_outputs=2,
network_sources=[BridgeNetworkInput(
name="on-prem-source",
source=BridgeNetworkSource(
protocol=BridgeProtocol.RTP,
network=production_network,
multicast_ip="239.1.1.1",
port=5000
)
)]
),
gateway=gateway
)
Stack stack;
GatewayNetwork productionNetwork = GatewayNetwork.define(GatewayNetworkDefineProps.builder()
.cidrBlock("192.168.1.0/24")
.name("production-network")
.build());
Gateway gateway = Gateway.Builder.create(stack, "MyGateway")
.gatewayName("my-gateway")
.egressCidrBlocks(List.of("10.0.0.0/16"))
.networks(List.of(productionNetwork))
.build();
Bridge ingressBridge = Bridge.Builder.create(stack, "MyIngressBridge")
.bridgeName("my-ingress-bridge")
.config(BridgeConfiguration.ingress(IngressBridgeConfiguration.builder()
.maxBitrate(Bitrate.mbps(10))
.maxOutputs(2)
.networkSources(List.of(BridgeNetworkInput.builder()
.name("on-prem-source")
.source(BridgeNetworkSource.builder()
.protocol(BridgeProtocol.RTP)
.network(productionNetwork)
.multicastIp("239.1.1.1")
.port(5000)
.build())
.build()))
.build()))
.gateway(gateway)
.build();
Stack stack;
var productionNetwork = GatewayNetwork.Define(new GatewayNetworkDefineProps {
CidrBlock = "192.168.1.0/24",
Name = "production-network"
});
var gateway = new Gateway(stack, "MyGateway", new GatewayProps {
GatewayName = "my-gateway",
EgressCidrBlocks = new [] { "10.0.0.0/16" },
Networks = new [] { productionNetwork }
});
var ingressBridge = new Bridge(stack, "MyIngressBridge", new BridgeProps {
BridgeName = "my-ingress-bridge",
Config = BridgeConfiguration.Ingress(new IngressBridgeConfiguration {
MaxBitrate = Bitrate.Mbps(10),
MaxOutputs = 2,
NetworkSources = new [] { new BridgeNetworkInput {
Name = "on-prem-source",
Source = new BridgeNetworkSource {
Protocol = BridgeProtocol.RTP,
Network = productionNetwork,
MulticastIp = "239.1.1.1",
Port = 5000
}
} }
}),
Gateway = gateway
});
var stack Stack
productionNetwork := awsmediaconnectalpha.GatewayNetwork_Define(&GatewayNetworkDefineProps{
CidrBlock: jsii.String("192.168.1.0/24"),
Name: jsii.String("production-network"),
})
gateway := awsmediaconnectalpha.NewGateway(stack, jsii.String("MyGateway"), &GatewayProps{
GatewayName: jsii.String("my-gateway"),
EgressCidrBlocks: []*string{
jsii.String("10.0.0.0/16"),
},
Networks: []GatewayNetwork{
productionNetwork,
},
})
ingressBridge := awsmediaconnectalpha.NewBridge(stack, jsii.String("MyIngressBridge"), &BridgeProps{
BridgeName: jsii.String("my-ingress-bridge"),
Config: awsmediaconnectalpha.BridgeConfiguration_Ingress(&IngressBridgeConfiguration{
MaxBitrate: awscdk.Bitrate_Mbps(jsii.Number(10)),
MaxOutputs: jsii.Number(2),
NetworkSources: []BridgeNetworkInput{
&BridgeNetworkInput{
Name: jsii.String("on-prem-source"),
Source: &BridgeNetworkSource{
Protocol: awsmediaconnectalpha.BridgeProtocol_RTP(),
Network: productionNetwork,
MulticastIp: jsii.String("239.1.1.1"),
Port: jsii.Number(5000),
},
},
},
}),
Gateway: gateway,
})
Egress Bridge (Cloud to On-premises)
An egress bridge sends content from MediaConnect flows to on-premises equipment:
declare const stack: Stack;
declare const gateway: Gateway;
declare const flow: Flow;
declare const vpcInterface: VpcInterfaceConfig;
declare const productionNetwork: GatewayNetwork;
const egressBridge = new Bridge(stack, 'MyEgressBridge', {
bridgeName: 'my-egress-bridge',
config: BridgeConfiguration.egress({
maxBitrate: Bitrate.mbps(10),
flowSources: [{
name: 'cloud-source',
source: {
flow: flow,
vpcInterface: vpcInterface,
},
}],
networkOutputs: [{
name: 'on-prem-output',
output: BridgeOutputConfiguration.network({
ipAddress: '192.168.1.200',
port: 5001,
network: productionNetwork,
protocol: BridgeProtocol.RTP,
ttl: 50,
}),
}],
}),
gateway: gateway,
});
from aws_cdk.aws_mediaconnect_alpha import BridgeFlowInput, BridgeFlowSource, BridgeNetworkOutput
# stack: Stack
# gateway: Gateway
# flow: Flow
# vpc_interface: VpcInterfaceConfig
# production_network: GatewayNetwork
egress_bridge = Bridge(stack, "MyEgressBridge",
bridge_name="my-egress-bridge",
config=BridgeConfiguration.egress(
max_bitrate=Bitrate.mbps(10),
flow_sources=[BridgeFlowInput(
name="cloud-source",
source=BridgeFlowSource(
flow=flow,
vpc_interface=vpc_interface
)
)],
network_outputs=[BridgeNetworkOutput(
name="on-prem-output",
output=BridgeOutputConfiguration.network(
ip_address="192.168.1.200",
port=5001,
network=production_network,
protocol=BridgeProtocol.RTP,
ttl=50
)
)]
),
gateway=gateway
)
Stack stack;
Gateway gateway;
Flow flow;
VpcInterfaceConfig vpcInterface;
GatewayNetwork productionNetwork;
Bridge egressBridge = Bridge.Builder.create(stack, "MyEgressBridge")
.bridgeName("my-egress-bridge")
.config(BridgeConfiguration.egress(EgressBridgeConfiguration.builder()
.maxBitrate(Bitrate.mbps(10))
.flowSources(List.of(BridgeFlowInput.builder()
.name("cloud-source")
.source(BridgeFlowSource.builder()
.flow(flow)
.vpcInterface(vpcInterface)
.build())
.build()))
.networkOutputs(List.of(BridgeNetworkOutput.builder()
.name("on-prem-output")
.output(BridgeOutputConfiguration.network(BridgeNetworkOutputProps.builder()
.ipAddress("192.168.1.200")
.port(5001)
.network(productionNetwork)
.protocol(BridgeProtocol.RTP)
.ttl(50)
.build()))
.build()))
.build()))
.gateway(gateway)
.build();
Stack stack;
Gateway gateway;
Flow flow;
VpcInterfaceConfig vpcInterface;
GatewayNetwork productionNetwork;
var egressBridge = new Bridge(stack, "MyEgressBridge", new BridgeProps {
BridgeName = "my-egress-bridge",
Config = BridgeConfiguration.Egress(new EgressBridgeConfiguration {
MaxBitrate = Bitrate.Mbps(10),
FlowSources = new [] { new BridgeFlowInput {
Name = "cloud-source",
Source = new BridgeFlowSource {
Flow = flow,
VpcInterface = vpcInterface
}
} },
NetworkOutputs = new [] { new BridgeNetworkOutput {
Name = "on-prem-output",
Output = BridgeOutputConfiguration.Network(new BridgeNetworkOutputProps {
IpAddress = "192.168.1.200",
Port = 5001,
Network = productionNetwork,
Protocol = BridgeProtocol.RTP,
Ttl = 50
})
} }
}),
Gateway = gateway
});
var stack Stack
var gateway Gateway
var flow Flow
var vpcInterface VpcInterfaceConfig
var productionNetwork GatewayNetwork
egressBridge := awsmediaconnectalpha.NewBridge(stack, jsii.String("MyEgressBridge"), &BridgeProps{
BridgeName: jsii.String("my-egress-bridge"),
Config: awsmediaconnectalpha.BridgeConfiguration_Egress(&EgressBridgeConfiguration{
MaxBitrate: awscdk.Bitrate_Mbps(jsii.Number(10)),
FlowSources: []BridgeFlowInput{
&BridgeFlowInput{
Name: jsii.String("cloud-source"),
Source: &BridgeFlowSource{
Flow: flow,
VpcInterface: vpcInterface,
},
},
},
NetworkOutputs: []BridgeNetworkOutput{
&BridgeNetworkOutput{
Name: jsii.String("on-prem-output"),
Output: awsmediaconnectalpha.BridgeOutputConfiguration_Network(&BridgeNetworkOutputProps{
IpAddress: jsii.String("192.168.1.200"),
Port: jsii.Number(5001),
Network: productionNetwork,
Protocol: awsmediaconnectalpha.BridgeProtocol_RTP(),
Ttl: jsii.Number(50),
}),
},
},
}),
Gateway: gateway,
})
Bridge Sources
For failover scenarios, you can add additional sources to an existing bridge using the BridgeSource construct:
declare const stack: Stack;
declare const bridge: Bridge;
declare const flow: Flow;
// Add a flow source to an egress bridge (requires failover to be enabled)
const additionalSource = new BridgeSource(stack, 'AdditionalSource', {
bridgeSourceName: 'backup-source',
bridge: bridge,
source: BridgeSourceConfiguration.flow({
flow: flow,
}),
});
# stack: Stack
# bridge: Bridge
# flow: Flow
# Add a flow source to an egress bridge (requires failover to be enabled)
additional_source = BridgeSource(stack, "AdditionalSource",
bridge_source_name="backup-source",
bridge=bridge,
source=BridgeSourceConfiguration.flow(
flow=flow
)
)
Stack stack;
Bridge bridge;
Flow flow;
// Add a flow source to an egress bridge (requires failover to be enabled)
BridgeSource additionalSource = BridgeSource.Builder.create(stack, "AdditionalSource")
.bridgeSourceName("backup-source")
.bridge(bridge)
.source(BridgeSourceConfiguration.flow(BridgeFlowSource.builder()
.flow(flow)
.build()))
.build();
Stack stack;
Bridge bridge;
Flow flow;
// Add a flow source to an egress bridge (requires failover to be enabled)
var additionalSource = new BridgeSource(stack, "AdditionalSource", new BridgeSourceProps {
BridgeSourceName = "backup-source",
Bridge = bridge,
Source = BridgeSourceConfiguration.Flow(new BridgeFlowSource {
Flow = flow
})
});
var stack Stack
var bridge Bridge
var flow Flow
// Add a flow source to an egress bridge (requires failover to be enabled)
additionalSource := awsmediaconnectalpha.NewBridgeSource(stack, jsii.String("AdditionalSource"), &BridgeSourceProps{
BridgeSourceName: jsii.String("backup-source"),
Bridge: bridge,
Source: awsmediaconnectalpha.BridgeSourceConfiguration_Flow(&BridgeFlowSource{
Flow: flow,
}),
})
Bridge Outputs
Bridge outputs are configured as part of the bridge configuration for egress bridges. They define where content exits the bridge to on-premises equipment.
declare const productionNetwork: GatewayNetwork;
const networkConfig = BridgeOutputConfiguration.network({
ipAddress: '192.168.1.200',
port: 5001,
network: productionNetwork,
protocol: BridgeProtocol.RTP,
ttl: 50,
});
const namedOutput = { name: 'on-prem-output', output: networkConfig };
# production_network: GatewayNetwork
network_config = BridgeOutputConfiguration.network(
ip_address="192.168.1.200",
port=5001,
network=production_network,
protocol=BridgeProtocol.RTP,
ttl=50
)
named_output = {"name": "on-prem-output", "output": network_config}
GatewayNetwork productionNetwork;
BridgeOutputConfiguration networkConfig = BridgeOutputConfiguration.network(BridgeNetworkOutputProps.builder()
.ipAddress("192.168.1.200")
.port(5001)
.network(productionNetwork)
.protocol(BridgeProtocol.RTP)
.ttl(50)
.build());
Map<String, Object> namedOutput = Map.of("name", "on-prem-output", "output", networkConfig);
GatewayNetwork productionNetwork;
var networkConfig = BridgeOutputConfiguration.Network(new BridgeNetworkOutputProps {
IpAddress = "192.168.1.200",
Port = 5001,
Network = productionNetwork,
Protocol = BridgeProtocol.RTP,
Ttl = 50
});
IDictionary<string, object> namedOutput = new Dictionary<string, object> { { "name", "on-prem-output" }, { "output", networkConfig } };
var productionNetwork GatewayNetwork
networkConfig := awsmediaconnectalpha.BridgeOutputConfiguration_Network(&BridgeNetworkOutputProps{
IpAddress: jsii.String("192.168.1.200"),
Port: jsii.Number(5001),
Network: productionNetwork,
Protocol: awsmediaconnectalpha.BridgeProtocol_RTP(),
Ttl: jsii.Number(50),
})
namedOutput := map[string]interface{}{
"name": jsii.String("on-prem-output"),
"output": networkConfig,
}
Encryption
MediaConnect supports encryption for sources, outputs, and entitlements. This package provides type-safe encryption configuration structs that match the encryption requirements for different protocols.
Encryption Types
MediaConnect supports two types of encryption:
- Static Key Encryption - Used for Zixi Push/Pull protocols and entitlements
- SRT Password Encryption - Used for SRT Listener and SRT Caller protocols
Note: CFN exposes only static-key and srt-password for flow output encryption today; SPEKE is not currently part of the surface.
Auto-created IAM role. Every encryption struct accepts an optional role. Omit it and the consuming construct creates a scoped role for you: trust policy for mediaconnect.amazonaws.com with aws:SourceAccount + aws:SourceArn conditions (confused-deputy protection), and just enough permission to read the provided secret (including kms:Decrypt when the secret uses a customer-managed KMS key).
Providing your own role. If you supply a role, it's used as-is — the construct does not grant it any permissions. You must grant it the necessary permissions yourself. Provide your own role when you need stricter control or a shared identity.
Trust-policy scope: flows vs. routers. When the L2 auto-creates a role, it also pins aws:SourceArn to the consuming resource:
- Flows — the trust policy pins the flow ARN (
arn:...:flow:*:<flow-name>). The*wildcards the service-assigned id segment; the flow name is fixed at create time. - Routers — the trust policy can only pin a wildcarded ARN (
arn:...:routerInput:*/arn:...:routerOutput:*). Router I/O ARNs use a service-generated id segment that is unknown at synth time, and using the live ARN attribute would create a CloudFormation dependency cycle (role → router → role). If you need per-resource pinning, supply your ownrolewith a trust condition that pins the exact ARN — you can compute it from the resource'srouterInputId/routerOutputIdafter first deploy and apply it on a follow-up deploy.
Static Key Encryption
Use a static-key encryption struct for Zixi protocols and entitlements. This requires an encryption algorithm (AES128, AES192, or AES256). Pass it inline where the construct asks for it:
declare const stack: Stack;
declare const flow: Flow;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;
new FlowEntitlement(stack, 'MyEntitlement', {
flow,
subscribers: ['111122223333'],
description: 'Grant partner access to live feed',
encryption: {
role,
secret,
algorithm: EncryptionAlgorithm.AES256,
},
});
from aws_cdk.aws_mediaconnect_alpha import StaticKeyEncryption
# stack: Stack
# flow: Flow
# role: iam.IRole
# secret: secretsmanager.ISecret
FlowEntitlement(stack, "MyEntitlement",
flow=flow,
subscribers=["111122223333"],
description="Grant partner access to live feed",
encryption=StaticKeyEncryption(
role=role,
secret=secret,
algorithm=EncryptionAlgorithm.AES256
)
)
Stack stack;
Flow flow;
IRole role;
ISecret secret;
FlowEntitlement.Builder.create(stack, "MyEntitlement")
.flow(flow)
.subscribers(List.of("111122223333"))
.description("Grant partner access to live feed")
.encryption(StaticKeyEncryption.builder()
.role(role)
.secret(secret)
.algorithm(EncryptionAlgorithm.AES256)
.build())
.build();
Stack stack;
Flow flow;
IRole role;
ISecret secret;
new FlowEntitlement(stack, "MyEntitlement", new FlowEntitlementProps {
Flow = flow,
Subscribers = new [] { "111122223333" },
Description = "Grant partner access to live feed",
Encryption = new StaticKeyEncryption {
Role = role,
Secret = secret,
Algorithm = EncryptionAlgorithm.AES256
}
});
var stack Stack
var flow Flow
var role IRole
var secret ISecret
awsmediaconnectalpha.NewFlowEntitlement(stack, jsii.String("MyEntitlement"), &FlowEntitlementProps{
Flow: Flow,
Subscribers: []*string{
jsii.String("111122223333"),
},
Description: jsii.String("Grant partner access to live feed"),
Encryption: &StaticKeyEncryption{
Role: *Role,
Secret: *Secret,
Algorithm: awsmediaconnectalpha.EncryptionAlgorithm_AES256(),
},
})
SRT Password Encryption
SRT protocols take an encryption struct with just role and secret — no algorithm:
declare const stack: Stack;
declare const flow: Flow;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;
new FlowOutput(stack, 'SrtOutput', {
flow,
output: OutputConfiguration.srtCaller({
destination: '203.0.113.100',
port: 7000,
encryption: { role, secret },
}),
});
from aws_cdk.aws_mediaconnect_alpha import SrtPasswordEncryption
# stack: Stack
# flow: Flow
# role: iam.IRole
# secret: secretsmanager.ISecret
FlowOutput(stack, "SrtOutput",
flow=flow,
output=OutputConfiguration.srt_caller(
destination="203.0.113.100",
port=7000,
encryption=SrtPasswordEncryption(role=role, secret=secret)
)
)
Stack stack;
Flow flow;
IRole role;
ISecret secret;
FlowOutput.Builder.create(stack, "SrtOutput")
.flow(flow)
.output(OutputConfiguration.srtCaller(SrtCallerOutputConfig.builder()
.destination("203.0.113.100")
.port(7000)
.encryption(SrtPasswordEncryption.builder().role(role).secret(secret).build())
.build()))
.build();
Stack stack;
Flow flow;
IRole role;
ISecret secret;
new FlowOutput(stack, "SrtOutput", new FlowOutputProps {
Flow = flow,
Output = OutputConfiguration.SrtCaller(new SrtCallerOutputConfig {
Destination = "203.0.113.100",
Port = 7000,
Encryption = new SrtPasswordEncryption { Role = role, Secret = secret }
})
});
var stack Stack
var flow Flow
var role IRole
var secret ISecret
awsmediaconnectalpha.NewFlowOutput(stack, jsii.String("SrtOutput"), &FlowOutputProps{
Flow: Flow,
Output: awsmediaconnectalpha.OutputConfiguration_SrtCaller(&SrtCallerOutputConfig{
Destination: jsii.String("203.0.113.100"),
Port: jsii.Number(7000),
Encryption: &SrtPasswordEncryption{
Role: *Role,
Secret: *Secret,
},
}),
})
Using Encryption with Sources
Apply encryption when configuring flow sources:
declare const stack: Stack;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;
// SRT Listener source with encryption
const flow = new Flow(stack, 'MyFlow', {
source: SourceConfiguration.srtListener({
flowSourceName: 'encrypted-source',
port: 5000,
network: NetworkConfiguration.publicNetwork('203.0.113.0/24'),
decryption: { role, secret },
}),
});
// Zixi Push source with encryption
const flow2 = new Flow(stack, 'MyFlow2', {
source: SourceConfiguration.zixiPush({
flowSourceName: 'encrypted-zixi-source',
maxLatency: Duration.millis(2000),
network: NetworkConfiguration.publicNetwork('203.0.113.0/24'),
decryption: {
role,
secret,
algorithm: EncryptionAlgorithm.AES256,
},
}),
});
from aws_cdk.aws_mediaconnect_alpha import SrtPasswordEncryption, StaticKeyEncryption
# stack: Stack
# role: iam.IRole
# secret: secretsmanager.ISecret
# SRT Listener source with encryption
flow = Flow(stack, "MyFlow",
source=SourceConfiguration.srt_listener(
flow_source_name="encrypted-source",
port=5000,
network=NetworkConfiguration.public_network("203.0.113.0/24"),
decryption=SrtPasswordEncryption(role=role, secret=secret)
)
)
# Zixi Push source with encryption
flow2 = Flow(stack, "MyFlow2",
source=SourceConfiguration.zixi_push(
flow_source_name="encrypted-zixi-source",
max_latency=Duration.millis(2000),
network=NetworkConfiguration.public_network("203.0.113.0/24"),
decryption=StaticKeyEncryption(
role=role,
secret=secret,
algorithm=EncryptionAlgorithm.AES256
)
)
)
Stack stack;
IRole role;
ISecret secret;
// SRT Listener source with encryption
Flow flow = Flow.Builder.create(stack, "MyFlow")
.source(SourceConfiguration.srtListener(SourceSrtListener.builder()
.flowSourceName("encrypted-source")
.port(5000)
.network(NetworkConfiguration.publicNetwork("203.0.113.0/24"))
.decryption(SrtPasswordEncryption.builder().role(role).secret(secret).build())
.build()))
.build();
// Zixi Push source with encryption
Flow flow2 = Flow.Builder.create(stack, "MyFlow2")
.source(SourceConfiguration.zixiPush(SourceZixiPush.builder()
.flowSourceName("encrypted-zixi-source")
.maxLatency(Duration.millis(2000))
.network(NetworkConfiguration.publicNetwork("203.0.113.0/24"))
.decryption(StaticKeyEncryption.builder()
.role(role)
.secret(secret)
.algorithm(EncryptionAlgorithm.AES256)
.build())
.build()))
.build();
Stack stack;
IRole role;
ISecret secret;
// SRT Listener source with encryption
var flow = new Flow(stack, "MyFlow", new FlowProps {
Source = SourceConfiguration.SrtListener(new SourceSrtListener {
FlowSourceName = "encrypted-source",
Port = 5000,
Network = NetworkConfiguration.PublicNetwork("203.0.113.0/24"),
Decryption = new SrtPasswordEncryption { Role = role, Secret = secret }
})
});
// Zixi Push source with encryption
var flow2 = new Flow(stack, "MyFlow2", new FlowProps {
Source = SourceConfiguration.ZixiPush(new SourceZixiPush {
FlowSourceName = "encrypted-zixi-source",
MaxLatency = Duration.Millis(2000),
Network = NetworkConfiguration.PublicNetwork("203.0.113.0/24"),
Decryption = new StaticKeyEncryption {
Role = role,
Secret = secret,
Algorithm = EncryptionAlgorithm.AES256
}
})
});
var stack Stack
var role IRole
var secret ISecret
// SRT Listener source with encryption
flow := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_SrtListener(&SourceSrtListener{
FlowSourceName: jsii.String("encrypted-source"),
Port: jsii.Number(5000),
Network: awsmediaconnectalpha.NetworkConfiguration_PublicNetwork(jsii.String("203.0.113.0/24")),
Decryption: &SrtPasswordEncryption{
Role: *Role,
Secret: *Secret,
},
}),
})
// Zixi Push source with encryption
flow2 := awsmediaconnectalpha.NewFlow(stack, jsii.String("MyFlow2"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_ZixiPush(&SourceZixiPush{
FlowSourceName: jsii.String("encrypted-zixi-source"),
MaxLatency: awscdk.Duration_Millis(jsii.Number(2000)),
Network: awsmediaconnectalpha.NetworkConfiguration_*PublicNetwork(jsii.String("203.0.113.0/24")),
Decryption: &StaticKeyEncryption{
Role: *Role,
Secret: *Secret,
Algorithm: awsmediaconnectalpha.EncryptionAlgorithm_AES256(),
},
}),
})
Using Encryption with Outputs
Apply encryption when configuring flow outputs:
declare const stack: Stack;
declare const flow: Flow;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;
// SRT Caller output with encryption
const output = new FlowOutput(stack, 'EncryptedOutput', {
flow: flow,
description: 'Encrypted SRT output',
output: OutputConfiguration.srtCaller({
destination: '203.0.113.100',
port: 7000,
encryption: { role, secret },
}),
});
from aws_cdk.aws_mediaconnect_alpha import SrtPasswordEncryption
# stack: Stack
# flow: Flow
# role: iam.IRole
# secret: secretsmanager.ISecret
# SRT Caller output with encryption
output = FlowOutput(stack, "EncryptedOutput",
flow=flow,
description="Encrypted SRT output",
output=OutputConfiguration.srt_caller(
destination="203.0.113.100",
port=7000,
encryption=SrtPasswordEncryption(role=role, secret=secret)
)
)
Stack stack;
Flow flow;
IRole role;
ISecret secret;
// SRT Caller output with encryption
FlowOutput output = FlowOutput.Builder.create(stack, "EncryptedOutput")
.flow(flow)
.description("Encrypted SRT output")
.output(OutputConfiguration.srtCaller(SrtCallerOutputConfig.builder()
.destination("203.0.113.100")
.port(7000)
.encryption(SrtPasswordEncryption.builder().role(role).secret(secret).build())
.build()))
.build();
Stack stack;
Flow flow;
IRole role;
ISecret secret;
// SRT Caller output with encryption
var output = new FlowOutput(stack, "EncryptedOutput", new FlowOutputProps {
Flow = flow,
Description = "Encrypted SRT output",
Output = OutputConfiguration.SrtCaller(new SrtCallerOutputConfig {
Destination = "203.0.113.100",
Port = 7000,
Encryption = new SrtPasswordEncryption { Role = role, Secret = secret }
})
});
var stack Stack
var flow Flow
var role IRole
var secret ISecret
// SRT Caller output with encryption
output := awsmediaconnectalpha.NewFlowOutput(stack, jsii.String("EncryptedOutput"), &FlowOutputProps{
Flow: flow,
Description: jsii.String("Encrypted SRT output"),
Output: awsmediaconnectalpha.OutputConfiguration_SrtCaller(&SrtCallerOutputConfig{
Destination: jsii.String("203.0.113.100"),
Port: jsii.Number(7000),
Encryption: &SrtPasswordEncryption{
Role: *Role,
Secret: *Secret,
},
}),
})
Using Encryption with Entitlements
Entitlements use static key encryption:
declare const stack: Stack;
declare const flow: Flow;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;
const entitlement = new FlowEntitlement(stack, 'MyEntitlement', {
flow: flow,
description: 'Grant partner access to live feed',
subscribers: ['111122223333'],
encryption: {
role,
secret,
algorithm: EncryptionAlgorithm.AES256,
},
});
from aws_cdk.aws_mediaconnect_alpha import StaticKeyEncryption
# stack: Stack
# flow: Flow
# role: iam.IRole
# secret: secretsmanager.ISecret
entitlement = FlowEntitlement(stack, "MyEntitlement",
flow=flow,
description="Grant partner access to live feed",
subscribers=["111122223333"],
encryption=StaticKeyEncryption(
role=role,
secret=secret,
algorithm=EncryptionAlgorithm.AES256
)
)
Stack stack;
Flow flow;
IRole role;
ISecret secret;
FlowEntitlement entitlement = FlowEntitlement.Builder.create(stack, "MyEntitlement")
.flow(flow)
.description("Grant partner access to live feed")
.subscribers(List.of("111122223333"))
.encryption(StaticKeyEncryption.builder()
.role(role)
.secret(secret)
.algorithm(EncryptionAlgorithm.AES256)
.build())
.build();
Stack stack;
Flow flow;
IRole role;
ISecret secret;
var entitlement = new FlowEntitlement(stack, "MyEntitlement", new FlowEntitlementProps {
Flow = flow,
Description = "Grant partner access to live feed",
Subscribers = new [] { "111122223333" },
Encryption = new StaticKeyEncryption {
Role = role,
Secret = secret,
Algorithm = EncryptionAlgorithm.AES256
}
});
var stack Stack
var flow Flow
var role IRole
var secret ISecret
entitlement := awsmediaconnectalpha.NewFlowEntitlement(stack, jsii.String("MyEntitlement"), &FlowEntitlementProps{
Flow: flow,
Description: jsii.String("Grant partner access to live feed"),
Subscribers: []*string{
jsii.String("111122223333"),
},
Encryption: &StaticKeyEncryption{
Role: *Role,
Secret: *Secret,
Algorithm: awsmediaconnectalpha.EncryptionAlgorithm_AES256(),
},
})
Router Transit Encryption
When integrating flows with routers, use transit encryption to secure the connection between the flow and router:
declare const stack: Stack;
declare const flow: Flow;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;
declare const existingRouterOutput: RouterOutput;
// Flow output to router with transit encryption
const routerOutput = new FlowOutput(stack, 'RouterOutput', {
flow: flow,
output: OutputConfiguration.router({
encryption: { role, secret },
}),
});
// Flow source from router with transit encryption
const flowFromRouter = new Flow(stack, 'FlowFromRouter', {
source: SourceConfiguration.router({
routerOutput: existingRouterOutput,
decryption: { role, secret },
}),
});
from aws_cdk.aws_mediaconnect_alpha import TransitEncryption, TransitEncryption
# stack: Stack
# flow: Flow
# role: iam.IRole
# secret: secretsmanager.ISecret
# existing_router_output: RouterOutput
# Flow output to router with transit encryption
router_output = FlowOutput(stack, "RouterOutput",
flow=flow,
output=OutputConfiguration.router(
encryption=TransitEncryption(role=role, secret=secret)
)
)
# Flow source from router with transit encryption
flow_from_router = Flow(stack, "FlowFromRouter",
source=SourceConfiguration.router(
router_output=existing_router_output,
decryption=TransitEncryption(role=role, secret=secret)
)
)
Stack stack;
Flow flow;
IRole role;
ISecret secret;
RouterOutput existingRouterOutput;
// Flow output to router with transit encryption
FlowOutput routerOutput = FlowOutput.Builder.create(stack, "RouterOutput")
.flow(flow)
.output(OutputConfiguration.router(RouterTransitConfig.builder()
.encryption(TransitEncryption.builder().role(role).secret(secret).build())
.build()))
.build();
// Flow source from router with transit encryption
Flow flowFromRouter = Flow.Builder.create(stack, "FlowFromRouter")
.source(SourceConfiguration.router(RouterSource.builder()
.routerOutput(existingRouterOutput)
.decryption(TransitEncryption.builder().role(role).secret(secret).build())
.build()))
.build();
Stack stack;
Flow flow;
IRole role;
ISecret secret;
RouterOutput existingRouterOutput;
// Flow output to router with transit encryption
var routerOutput = new FlowOutput(stack, "RouterOutput", new FlowOutputProps {
Flow = flow,
Output = OutputConfiguration.Router(new RouterTransitConfig {
Encryption = new TransitEncryption { Role = role, Secret = secret }
})
});
// Flow source from router with transit encryption
var flowFromRouter = new Flow(stack, "FlowFromRouter", new FlowProps {
Source = SourceConfiguration.Router(new RouterSource {
RouterOutput = existingRouterOutput,
Decryption = new TransitEncryption { Role = role, Secret = secret }
})
});
var stack Stack
var flow Flow
var role IRole
var secret ISecret
var existingRouterOutput RouterOutput
// Flow output to router with transit encryption
routerOutput := awsmediaconnectalpha.NewFlowOutput(stack, jsii.String("RouterOutput"), &FlowOutputProps{
Flow: flow,
Output: awsmediaconnectalpha.OutputConfiguration_Router(&RouterTransitConfig{
Encryption: &TransitEncryption{
Role: *Role,
Secret: *Secret,
},
}),
})
// Flow source from router with transit encryption
flowFromRouter := awsmediaconnectalpha.NewFlow(stack, jsii.String("FlowFromRouter"), &FlowProps{
Source: awsmediaconnectalpha.SourceConfiguration_Router(&RouterSource{
RouterOutput: existingRouterOutput,
Decryption: &TransitEncryption{
Role: *Role,
Secret: *Secret,
},
}),
})
Router SRT Encryption
Router outputs using SRT protocols use RouterSrtEncryption for encryption:
declare const stack: Stack;
declare const networkInterface: RouterNetworkInterface;
declare const role: iam.IRole;
declare const secret: secretsmanager.ISecret;
const output = new RouterOutput(stack, 'EncryptedSrtOutput', {
routerOutputName: 'encrypted-srt-output',
maximumBitrate: Bitrate.mbps(10),
routingScope: RoutingScope.REGIONAL,
tier: RouterOutputTier.OUTPUT_20,
configuration: RouterOutputConfiguration.standard({
protocol: RouterOutputProtocol.srtCaller({
destinationAddress: '203.0.113.100',
destinationPort: 9001,
minimumLatency: Duration.millis(200),
encryptionConfiguration: { role, secret },
}),
networkInterface: networkInterface,
}),
});
from aws_cdk.aws_mediaconnect_alpha import RouterSrtEncryption
# stack: Stack
# network_interface: RouterNetworkInterface
# role: iam.IRole
# secret: secretsmanager.ISecret
output = RouterOutput(stack, "EncryptedSrtOutput",
router_output_name="encrypted-srt-output",
maximum_bitrate=Bitrate.mbps(10),
routing_scope=RoutingScope.REGIONAL,
tier=RouterOutputTier.OUTPUT_20,
configuration=RouterOutputConfiguration.standard(
protocol=RouterOutputProtocol.srt_caller(
destination_address="203.0.113.100",
destination_port=9001,
minimum_latency=Duration.millis(200),
encryption_configuration=RouterSrtEncryption(role=role, secret=secret)
),
network_interface=network_interface
)
)
Stack stack;
RouterNetworkInterface networkInterface;
IRole role;
ISecret secret;
RouterOutput output = RouterOutput.Builder.create(stack, "EncryptedSrtOutput")
.routerOutputName("encrypted-srt-output")
.maximumBitrate(Bitrate.mbps(10))
.routingScope(RoutingScope.REGIONAL)
.tier(RouterOutputTier.OUTPUT_20)
.configuration(RouterOutputConfiguration.standard(StandardOutputConfigurationProps.builder()
.protocol(RouterOutputProtocol.srtCaller(SrtCallerOutputProtocolProps.builder()
.destinationAddress("203.0.113.100")
.destinationPort(9001)
.minimumLatency(Duration.millis(200))
.encryptionConfiguration(RouterSrtEncryption.builder().role(role).secret(secret).build())
.build()))
.networkInterface(networkInterface)
.build()))
.build();
Stack stack;
RouterNetworkInterface networkInterface;
IRole role;
ISecret secret;
var output = new RouterOutput(stack, "EncryptedSrtOutput", new RouterOutputProps {
RouterOutputName = "encrypted-srt-output",
MaximumBitrate = Bitrate.Mbps(10),
RoutingScope = RoutingScope.REGIONAL,
Tier = RouterOutputTier.OUTPUT_20,
Configuration = RouterOutputConfiguration.Standard(new StandardOutputConfigurationProps {
Protocol = RouterOutputProtocol.SrtCaller(new SrtCallerOutputProtocolProps {
DestinationAddress = "203.0.113.100",
DestinationPort = 9001,
MinimumLatency = Duration.Millis(200),
EncryptionConfiguration = new RouterSrtEncryption { Role = role, Secret = secret }
}),
NetworkInterface = networkInterface
})
});
var stack Stack
var networkInterface RouterNetworkInterface
var role IRole
var secret ISecret
output := awsmediaconnectalpha.NewRouterOutput(stack, jsii.String("EncryptedSrtOutput"), &RouterOutputProps{
RouterOutputName: jsii.String("encrypted-srt-output"),
MaximumBitrate: awscdk.Bitrate_Mbps(jsii.Number(10)),
RoutingScope: awsmediaconnectalpha.RoutingScope_REGIONAL(),
Tier: awsmediaconnectalpha.RouterOutputTier_OUTPUT_20(),
Configuration: awsmediaconnectalpha.RouterOutputConfiguration_Standard(&StandardOutputConfigurationProps{
Protocol: awsmediaconnectalpha.RouterOutputProtocol_SrtCaller(&SrtCallerOutputProtocolProps{
DestinationAddress: jsii.String("203.0.113.100"),
DestinationPort: jsii.Number(9001),
MinimumLatency: awscdk.Duration_Millis(jsii.Number(200)),
EncryptionConfiguration: &RouterSrtEncryption{
Role: *Role,
Secret: *Secret,
},
}),
NetworkInterface: networkInterface,
}),
})
Note: RouterSrtEncryption is distinct from SrtPasswordEncryption (used on flow sources/outputs) — router outputs use a simpler CFN shape without a keyType discriminator.
CloudWatch Metrics
Flows and Bridges expose CloudWatch metric helpers for monitoring. You can create alarms and dashboards using these metrics:
declare const flow: Flow;
declare const stack: Stack;
// Create a CloudWatch alarm on source bitrate
const alarm = flow.metricSourceBitrate().createAlarm(stack, 'LowBitrate', {
threshold: 1000000,
evaluationPeriods: 1,
});
// Monitor unrecovered packets
flow.metricSourceNotRecoveredPackets().createAlarm(stack, 'PacketLoss', {
threshold: 100,
evaluationPeriods: 2,
});
// Track total packets with custom options
const totalPackets = flow.metricSourceTotalPackets({
statistic: 'sum',
period: Duration.minutes(5),
});
# flow: Flow
# stack: Stack
# Create a CloudWatch alarm on source bitrate
alarm = flow.metric_source_bitrate().create_alarm(stack, "LowBitrate",
threshold=1000000,
evaluation_periods=1
)
# Monitor unrecovered packets
flow.metric_source_not_recovered_packets().create_alarm(stack, "PacketLoss",
threshold=100,
evaluation_periods=2
)
# Track total packets with custom options
total_packets = flow.metric_source_total_packets(
statistic="sum",
period=Duration.minutes(5)
)
Flow flow;
Stack stack;
// Create a CloudWatch alarm on source bitrate
Alarm alarm = flow.metricSourceBitrate().createAlarm(stack, "LowBitrate", CreateAlarmOptions.builder()
.threshold(1000000)
.evaluationPeriods(1)
.build());
// Monitor unrecovered packets
flow.metricSourceNotRecoveredPackets().createAlarm(stack, "PacketLoss", CreateAlarmOptions.builder()
.threshold(100)
.evaluationPeriods(2)
.build());
// Track total packets with custom options
Metric totalPackets = flow.metricSourceTotalPackets(MetricOptions.builder()
.statistic("sum")
.period(Duration.minutes(5))
.build());
Flow flow;
Stack stack;
// Create a CloudWatch alarm on source bitrate
var alarm = flow.MetricSourceBitrate().CreateAlarm(stack, "LowBitrate", new CreateAlarmOptions {
Threshold = 1000000,
EvaluationPeriods = 1
});
// Monitor unrecovered packets
flow.MetricSourceNotRecoveredPackets().CreateAlarm(stack, "PacketLoss", new CreateAlarmOptions {
Threshold = 100,
EvaluationPeriods = 2
});
// Track total packets with custom options
var totalPackets = flow.MetricSourceTotalPackets(new MetricOptions {
Statistic = "sum",
Period = Duration.Minutes(5)
});
var flow Flow
var stack Stack
// Create a CloudWatch alarm on source bitrate
alarm := flow.metricSourceBitrate().CreateAlarm(stack, jsii.String("LowBitrate"), &CreateAlarmOptions{
Threshold: jsii.Number(1000000),
EvaluationPeriods: jsii.Number(1),
})
// Monitor unrecovered packets
flow.metricSourceNotRecoveredPackets().CreateAlarm(stack, jsii.String("PacketLoss"), &CreateAlarmOptions{
Threshold: jsii.Number(100),
EvaluationPeriods: jsii.Number(2),
})
// Track total packets with custom options
totalPackets := flow.metricSourceTotalPackets(&MetricOptions{
Statistic: jsii.String("sum"),
Period: awscdk.Duration_Minutes(jsii.Number(5)),
})
Flow metrics
metricSourceBitrate()- Bitrate of content ingested into the flow (average)metricSourceNotRecoveredPackets()- Packets lost in transit that were not recovered by error correction (sum)metricSourceTotalPackets()- Total packets received by the flow sources (sum)metricSourceSelected()- Indicates which source is being used under Failover mode (max; 1 = active, 0 = standby)metricSourceConnected()- Source connection state for Zixi, SRT, and RIST (min; 1 = connected, 0 = disconnected)metricSourceDisconnections()- Number of times the source transitioned from connected to disconnected (sum)metricSourceDroppedPackets()- Packets lost before any error correction took place (sum)metricSourcePacketLossPercent()- Percentage of packets lost during transit, even if they were recovered (average)metricSourceRoundTripTime()- Round-trip time to the source for RIST, Zixi, and SRT (average, milliseconds)metricSourceJitter()- Current network jitter of the source (average, milliseconds)metric(metricName)- Create a custom metric by name
Bridge metrics
Bridge metrics are dimensioned by BridgeARN. The underlying CloudWatch metric name is chosen automatically based on whether the bridge is ingress or egress.
metricSourceBitrate(bridgeSourceName)- Bitrate of a specific bridge source (average)metricSourcePacketLossPercent(bridgeSourceName)- Percentage of packets lost on a specific bridge source (average)metricFailoverSwitches()- Total number of times the bridge switches between sources underFAILOVERfailover mode (sum)metric(metricName)- Create a custom metric by name
Router Input metrics
Router input metrics are dimensioned by RouterInputARN.
metricBitrate()- Bitrate of the router input's payload (average)metricNotRecoveredPackets()- Packets lost in transit that were not recovered by error correction (sum)metricTotalPackets()- Total number of packets received by the router input (sum)metricConnected()- Connection state for SRT sources (min; 1 = connected, 0 = disconnected)metricContinuityCounterErrors()- Continuity counter errors in the transport stream (sum)metricLatency()- Recovery latency of the input stream for RIST, SRT, and RTP-FEC (average, milliseconds)metricFailoverSwitches()- Total times the router input switched sources under Failover mode (sum)metric(metricName)- Create a custom metric by name
Router Output metrics
Router output metrics are dimensioned by RouterOutputARN.
metricBitrate()- Bitrate of the router output's payload (average)metricTotalPackets()- Total number of packets sent by the router output (sum)metricConnected()- Connection state for SRT outputs (min; 1 = connected, 0 = disconnected)metricArqRequests()- Retransmitted packets requested through ARQ for RIST and SRT outputs (sum)metric(metricName)- Create a custom metric by name
Gateway metrics
Gateway metrics are dimensioned by GatewayARN. Pass extra dimensions such as NetworkName, InstanceId, or BridgeSourceName via props.dimensionsMap to narrow to a specific network, appliance, or bridge source.
metricEgressBridgeTotalPackets()- Total packets sent from egress bridges hosted on the gateway (sum)metricEgressBridgeDroppedPackets()- Packets dropped by egress bridges hosted on the gateway (sum)metricIngressBridgeTotalPackets()- Total packets received by ingress bridges hosted on the gateway (sum)metricIngressBridgeDroppedPackets()- Packets dropped by ingress bridges hosted on the gateway (sum)metric(metricName)- Create a custom metric by name (e.g.IngressBridgeBitRate,EgressBridgeBitRate,IngressBridgeSourcePacketLossPercent)
Pair the total + dropped helpers to build a dropped-packet percentage chart — for example, divide metricEgressBridgeDroppedPackets() by metricEgressBridgeTotalPackets() in a math expression.
All metrics support standard CloudWatch metric options for customizing period, statistic, and dimensions.
Public CIDR warnings
Several constructs accept CIDR ranges that determine who can contribute content or pull outputs. Passing an open range (0.0.0.0/0 or any /0 prefix) makes the resource reachable from anywhere on the public internet, which is rarely what you want. The module emits synthesis-time warnings when it detects an open range on:
GatewayProps.egressCidrBlocksNetworkConfiguration.publicNetwork(cidr)used on flow sourcescidrAllowListon Zixi Push / Zixi Pull / SRT Listener flow outputsRouterNetworkConfiguration.publicNetwork({ cidr })
Restrict each range to the narrowest set of addresses that actually need access.
Types
| Name | Kind | Summary |
|---|---|---|
Bridge | Construct (L2) | Defines a AWS Elemental MediaConnect Bridge. |
BridgeOutput | Construct (L2) | Adds outputs to an existing bridge. |
BridgeSource | Construct (L2) | Adds sources to an existing bridge. |
Flow | Construct (L2) | Defines an AWS Elemental MediaConnect Flow. |
FlowEntitlement | Construct (L2) | Resource defines the permission that an AWS account grants to another AWS account to allow access to the content in a specific AWS Elemental MediaConnect flow. |
FlowOutput | Construct (L2) | Resource defines the destination address, protocol, and port that AWS Elemental MediaConnect sends the ingested video to. |
FlowSource | Construct (L2) | Adds source to an existing flow. |
Gateway | Construct (L2) | AWS Elemental MediaConnect Gateway is a feature of MediaConnect that allows the deployment of on-premises resources for transporting live video to and from the AWS Cloud. |
RouterInput | Construct (L2) | Defines an AWS Elemental MediaConnect Router Input. |
RouterNetworkInterface | Construct (L2) | Defines a AWS Elemental MediaConnect Router Network Interface. |
RouterOutput | Construct (L2) | Defines an AWS Elemental MediaConnect Router Output. |
AddFlowOutputOptions | Struct | Options for adding an output to a flow. |
AudioStreamOrderOptions | Class | Audio Stream Order Options. |
BridgeAttributes | Struct | Attributes for importing an existing Bridge. |
BridgeConfiguration | Class | Bridge configuration to set ingress and egress options on the bridge. |
BridgeFailoverConfig | Class | Source failover configuration for a bridge. |
BridgeFailoverOptions | Struct | Options for bridge source failover. |
BridgeFlowInput | Struct | A named flow source for an egress bridge. |
BridgeFlowSource | Struct | The source of the bridge. |
BridgeNetworkInput | Struct | A named network source for an ingress bridge. |
BridgeNetworkOutput | Struct | A named network output for an egress bridge. |
BridgeNetworkOutputProps | Struct | Properties for a bridge network output. |
BridgeNetworkSource | Struct | Bridge network source options. |
BridgeOutputConfiguration | Class | Configuration for a bridge output. |
BridgeOutputProps | Struct | Properties for the bridge output. |
BridgeProps | Struct | Properties for the Bridge. |
BridgeProtocol | Class | Options for bridge network source and output protocols. |
BridgeSourceConfiguration | Class | Factory class for creating bridge source configurations. |
BridgeSourceProps | Struct | Properties for the bridge source. |
BridgeType | Class | Configuration of bridge type. |
Colorimetry | Class | Option for Colorimetry. |
EgressBridgeConfiguration | Struct | Egress bridge configuration. |
Encoding | Class | Encoding options. |
EncodingConfig | Struct | Encoding configuration applied to an NDI source when transcoding it to a transport stream for downstream distribution. |
EncodingProfile | Enum | Encoding profiles supported when transcoding an NDI source to a transport stream. |
EncryptionAlgorithm | Class | Encryption Algorithms used in AWS Elemental MediaConnect. |
EntitlementSource | Struct | Options for Entitlement. |
EntitlementStatus | Enum | Options for entitlement status. |
FailoverConfig | Class | Source failover configuration for a flow. |
FailoverConfigurationProps | Struct | Properties for failover Router Input configuration. |
FailoverFailoverOptions | Struct | Options for switchover-mode source failover. |
FailoverMode | Class | Failover Mode. |
FlowAttributes | Struct | Attributes for importing an existing Flow. |
FlowEntitlementProps | Struct | Properties for the Flow entitlement. |
FlowGrants | Facade | Collection of grant methods for a IFlowRef. |
FlowOutputProps | Struct | Properties for flow output. |
FlowProps | Struct | Properties for the Flow. |
FlowSize | Class | Options for Flow Size. |
FlowSourceAttributes | Struct | Attributes for importing an existing Flow Source. |
FlowSourceProps | Struct | Properties for the flow source. |
FmtpVideo | Struct | Options for FMTP Video. |
ForwardErrorCorrection | Enum | Forward Error Correction (FEC) options for RTP protocol. |
Framerate | Class | A video frame rate expressed as a rational number (numerator/denominator). |
GatewayBridgeSource | Struct | Options for Gateway Bridge Source. |
GatewayNetwork | Class | A network on a MediaConnect Gateway. |
GatewayNetworkDefineProps | Struct | Properties for defining a Gateway network. |
GatewayProps | Struct | Properties for the MediaConnect Gateway. |
IBridge | Interface | Interface for Bridge. |
IBridgeOutput | Interface | Interface Bridge output. |
IBridgeSource | Interface | Interface Bridge source. |
IFlow | Interface | Interface for Flow. |
IFlowEntitlement | Interface | Interface for FlowEntitlement. |
IFlowOutput | Interface | Interface for Flow Output. |
IFlowSource | Interface | Interface for Flow Source. |
IGateway | Interface | Interface for Gateway. |
IngressBridgeConfiguration | Struct | Ingress bridge configuration. |
IRouterInput | Interface | Interface for Router Input. |
IRouterNetworkInterface | Interface | Interface for Router Network Interface. |
IRouterOutput | Interface | Interface for Router Output. |
KeyType | Class | Key types used across AWS Elemental MediaConnect. |
MaintenanceConfiguration | Struct | Configuration for scheduled maintenance windows. |
MaintenanceDay | Enum | Days of the week for scheduled maintenance windows. |
MaintenanceWindow | Struct | Configuration for scheduled maintenance windows. |
MediaConnectFlowConfigurationProps | Struct | Properties for MediaConnect Flow Router Input configuration. |
MediaConnectFlowConfigurationWithoutConnectionProps | Struct | Properties for MediaConnect Flow Router Input configuration - without a connection. |
MediaConnectFlowConnectionProps | Struct | Properties for MediaConnect Flow Router Output configuration with specific flow connection. |
MediaConnectFlowNoConnectionProps | Struct | Properties for MediaConnect Flow Router Output configuration without specific flow connection. |
MediaLiveChannelConfigurationProps | Struct | Properties for MediaLive Channel Router Input configuration. |
MediaLiveChannelConfigurationWithoutConnectionProps | Struct | Properties for MediaLive Channel Router Input configuration without a specific channel connection. |
MediaLiveInputConnectionProps | Struct | Properties for MediaLive Router Output configuration with specific input connection. |
MediaLiveNoInputConnectionProps | Struct | Properties for MediaLive Router Output configuration without specific input connection. |
MediaLivePipeline | Enum | MediaLive pipeline options. |
MediaStream | Class | Simplified configuration for Media Streams. |
MediaStreamAncillaryData | Struct | A media stream represents one component of your content, such as video, audio, or ancillary data. |
MediaStreamAudio | Struct | A media stream represents one component of your content, such as video, audio, or ancillary data. |
MediaStreamBase | Struct | Base configuration for Media Stream. |
MediaStreamSourceConfigurationCdi | Struct | Options for Media Stream Source Configuration. |
MediaStreamSourceConfigurationJpegXs | Struct | Options for Media Stream Source Configuration. |
MediaStreamVideo | Struct | A media stream represents one component of your content, such as video, audio, or ancillary data. |
MediaVideoFormat | Class | Options for Media Video format. |
MergeConfigurationProps | Struct | Properties for merge Router Input configuration. |
MergeFailoverOptions | Struct | Options for merge-mode source failover. |
MonitoringMetric | Struct | Configures a source monitoring metric. |
NdiConfig | Struct | Configuration for NDI Config. |
NdiDiscoveryServerConfig | Struct | NDI Configuration. |
NdiOutputConfig | Struct | Configuration options for NDI outputs. |
NetworkConfiguration | Class | Defines network configuration for a source — either a public network with a CIDR allowlist, or a VPC interface. |
NetworkInterface | Class | Network interface options. |
OutputConfiguration | Class | Configuration options to define a FlowOutput by protocol. |
PixelAspectRatio | Class | The pixel aspect ratio (PAR) of the video. |
PrimarySource | Enum | Identifies which protocol in a failover configuration's protocols array is primary. |
PublicNetworkConfigurationProps | Struct | Properties for public network configuration. |
RistOutputConfig | Struct | Configuration options for RIST outputs. |
RistOutputProtocolProps | Struct | Properties for RIST protocol configuration for outputs. |
RistProtocolProps | Struct | Properties for RIST protocol configuration. |
RouterInputAttributes | Struct | Attributes for importing an existing Router Input. |
RouterInputConfiguration | Class | Factory class for creating Router Input configurations. |
RouterInputEndpoint | Struct | A single ingest endpoint where the router input listens for upstream content. |
RouterInputGrants | Facade | Collection of grant methods for a IRouterInputRef. |
RouterInputProps | Struct | Properties for creating a Router Input. |
RouterInputProtocol | Class | Factory class for creating Router Input protocol configurations. |
RouterInputProtocolOptions | Class | Protocol options available for Router Input configurations. |
RouterInputTier | Class | Tier for a router input. |
RouterNetworkConfiguration | Class | Factory class for creating Router Network configurations. |
RouterNetworkInterfaceAttributes | Struct | Attributes for importing an existing Router Network Interface. |
RouterNetworkInterfaceProps | Struct | Properties for Router Network Interface. |
RouterOutputAttributes | Struct | Attributes for importing an existing Router Output. |
RouterOutputConfiguration | Class | Factory class for creating Router Output configurations. |
RouterOutputProps | Struct | Properties for creating a Router Output. |
RouterOutputProtocol | Class | Factory class for creating Router Output protocol configurations. |
RouterOutputProtocolOptions | Class | Protocol options available for Router Output configurations. |
RouterOutputTier | Class | Tier for a router output. |
RouterSource | Struct | Options for Router Source. |
RouterSrtEncryption | Struct | SRT encryption configuration for router inputs and outputs (SRT Listener and SRT Caller). |
RouterTransitConfig | Struct | Output configuration to Router. |
RoutingScope | Class | Routing scope for the Router Input. |
RtpFecOutputConfig | Struct | Configuration options for RTP-FEC outputs. |
RtpOutputConfig | Struct | Configuration options for RTP outputs. |
RtpOutputProtocolProps | Struct | Properties for RTP protocol configuration for outputs. |
RtpProtocolProps | Struct | Properties for RTP protocol configuration. |
ScanMode | Class | Options for Scan Mode. |
SourceBase | Struct | Common configuration across all inputs. |
SourceCdi | Struct | Configuration for CDI. |
SourceConfiguration | Class | Configurations for sources. |
SourceJpegXs | Struct | Configuration for Jpeg XS. |
SourceMonitoringConfig | Struct | Source monitoring settings. |
SourceNdi | Struct | Configuration for NDI (SpeedHQ) source. |
SourcePriorityConfig | Class | Source priority configuration for failover Router Input configurations. |
SourceProtocol | Class | Protocol Options for Sources. |
SourceRist | Struct | Configuration for RIST. |
SourceRtp | Struct | Configuration for RTP. |
SourceSrtCaller | Struct | Configuration for SRT Caller. |
SourceSrtListener | Struct | Configuration for SRT Listener. |
SourceZixiPush | Struct | Configuration for Zixi Push. |
SrtCallerOutputConfig | Struct | Configuration options for SRT Caller outputs. |
SrtCallerOutputProtocolProps | Struct | Properties for SRT Caller protocol configuration for outputs. |
SrtCallerProtocolProps | Struct | Properties for SRT Caller protocol configuration. |
SrtListenerOutputConfig | Struct | Configuration options for SRT Listener outputs. |
SrtListenerOutputProtocolProps | Struct | Properties for SRT Listener protocol configuration for outputs. |
SrtListenerProtocolProps | Struct | Properties for SRT Listener protocol configuration. |
SrtPasswordEncryption | Struct | SRT password encryption/decryption configuration for SRT Listener and SRT Caller sources and outputs on flows. |
StandardConfigurationProps | Struct | Properties for standard Router Input configuration. |
StandardOutputConfigurationProps | Struct | Properties for standard Router Output configuration. |
State | Enum | State configuration used across AWS Elemental MediaConnect. |
StaticKeyEncryption | Struct | Static key encryption/decryption configuration for Zixi protocol sources and outputs, and flow entitlements. |
Tcs | Class | Options for Tcs. |
TransitEncryption | Struct | Transit encryption configuration for router integrations — securing the link between a router and a flow or a MediaLive channel/input. |
VideoRange | Class | Options for Video Range. |
VpcInterface | Class | Factory class for creating VPC Interface configurations. |
VpcInterfaceConfig | Struct | VPC Interface configuration. |
VpcInterfaceDefineProps | Struct | Properties for defining a new VPC Interface configuration. |
VpcInterfaceFromNetworkInterfacesProps | Struct | Properties for creating a VPC Interface from existing network interfaces. |
VpcNetworkConfigurationProps | Struct | Properties for VPC network configuration. |
ZixiPullOutputConfig | Struct | Configuration options for Zixi Pull outputs. |
ZixiPushOutputConfig | Struct | Configuration options for Zixi Push outputs. |