
Build a UGC Live Streaming App with Amazon IVS: Creating an Amazon IVS Channel (Lesson 2.2)
Welcome to Lesson 2.2 in this series where we're looking at building a web based user-generated content live streaming application with Amazon IVS. This entire series is available in video format on the AWS Developers YouTube channel and all of the code related to the sample application used in this series can be viewed on GitHub. Refer to the links at the end of the post for more information.
/register
endpoint within the application. In this lesson, we'll see how the StreamCat application uses the AWS SDK for JavaScript (v3) to create an Amazon IVS channel for a user.User
, we invoke the createChannel()
method of the ChannelService
inside of the /register
endpoint handler.createChannel()
method uses the IvsClient
from the SDK for JavaScript and sends a CreateChannelCommand
. The CreateChannelCommandInput
object requires a name
, which is the same as the username
property of the User
object. The input object also contains a type
property which defines the type of input and output for the channel. More on this property in just a bit. The recordingConfigurationArn
is a reference to a pre-built and shared recording configuration resource and is retrieved from the application's environment variables (refer to lesson 1.4 to learn more about pre-built resources).Note: In StreamCat, new users are given a 'BASIC' channel. This means that their video is transmuxed which means that Amazon IVS delivers the original input quality to viewers. The viewer’s video-quality choice is limited to the original input. Input resolution can be up to 1080p and bitrate can be up to 1.5 Mbps for 480p and up to 3.5 Mbps for resolutions between 480p and 1080p. Original audio is passed through. Later, when a channel reaches a certain threshold, we can modify this channel type for more prolific content creators. See this document to learn more about the differences between different channel types in Amazon IVS.
/register
endpoint handler collects the channel properties returned in the CreateChannelCommandOutput
object, constructs a Channel
entity, and associates that entity with the User
.Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.