BridgeSource
The BridgeSource resource lets you manage AWS MediaConnect BridgeSources for streaming video content across various networks.
Minimal Example
Section titled “Minimal Example”Create a basic BridgeSource with required properties and one optional property:
import AWS from "alchemy/aws/control";
const bridgeSource = await AWS.MediaConnect.BridgeSource("myBridgeSource", { BridgeArn: "arn:aws:mediaconnect:us-west-2:123456789012:bridge:my-bridge", Name: "MyBridgeSource", NetworkSource: { Protocol: "RTP", Port: 5000, Address: "192.0.2.0/24" }});
Advanced Configuration
Section titled “Advanced Configuration”Configure a BridgeSource with additional settings, including a FlowSource:
const advancedBridgeSource = await AWS.MediaConnect.BridgeSource("advancedBridgeSource", { BridgeArn: "arn:aws:mediaconnect:us-west-2:123456789012:bridge:my-advanced-bridge", Name: "AdvancedBridgeSource", NetworkSource: { Protocol: "RTP", Port: 6000, Address: "192.0.2.0/24" }, FlowSource: { FlowArn: "arn:aws:mediaconnect:us-west-2:123456789012:flow:my-flow", MaxBitrate: 10000000, // 10 Mbps StreamId: "stream-1" }});
Adoption of Existing Resource
Section titled “Adoption of Existing Resource”If you want to adopt an existing BridgeSource instead of creating a new one, you can set the adopt
property to true
:
const adoptedBridgeSource = await AWS.MediaConnect.BridgeSource("adoptedBridgeSource", { BridgeArn: "arn:aws:mediaconnect:us-west-2:123456789012:bridge:existing-bridge", Name: "AdoptedBridgeSource", adopt: true});
Flow Source Configuration
Section titled “Flow Source Configuration”Create a BridgeSource specifically configured to link to an existing flow:
const flowBridgeSource = await AWS.MediaConnect.BridgeSource("flowBridgeSource", { BridgeArn: "arn:aws:mediaconnect:us-west-2:123456789012:bridge:flow-bridge", Name: "FlowBridgeSource", FlowSource: { FlowArn: "arn:aws:mediaconnect:us-west-2:123456789012:flow:flow-1", MaxBitrate: 5000000 // 5 Mbps }});