Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Create a signaling channel
A Kinesis Video Streams with WebRTC signaling channel facilitates the exchange of signaling messages
required to establish and maintain peer-to-peer connections between WebRTC clients. It
handles the negotiation of Session Description Protocol (SDP) offers and answers for
session parameters, as well as the exchange of Interactive Connectivity Establishment
(ICE) candidates for network information.
To create a signaling channel, call the CreateSignalingChannel API. This page will show you how to invoke that API
using the Amazon Web Services Management Console, Amazon CLI, and one of the Amazon SDKs.
Make note of the channel ARN, you'll need it later.
- Amazon Web Services Management Console
-
Do the following:
-
Open the Kinesis Video Streams Signaling
Channels console at https://console.aws.amazon.com/kinesisvideo/home/#/signalingChannels.
-
Choose Create signaling channel.
-
On the Create a new signaling channel page,
type the name for the signaling channel.
Leave the default Time-to-live (Ttl) value as
60 seconds.
Choose Create signaling channel.
-
Once the signaling channel is created, review the details on the
channel's details page.
- Amazon CLI
-
Verify that you have the Amazon CLI installed and configured. For more
information, see the Amazon Command Line Interface User Guide.
For installation instructions, see the Amazon Command Line Interface User Guide. After installation,
configure the Amazon CLI with credentials and region.
Alternatively, open the Amazon CloudShell terminal, which has the Amazon CLI
installed and configured. See the Amazon CloudShell User Guide for more information.
Run the following Create-Signaling-Channel command using the Amazon CLI:
aws kinesisvideo create-signaling-channel \
--channel-name "YourChannelName
" \
--region "us-west-2
"
The response will look like the following:
{
"ChannelARN": "arn:aws:kinesisvideo:us-west-2
:123456789012
:channel/YourChannelName
/1234567890123
"
}
- Amazon SDK
-
This code snippet shows you how to create a Kinesis Video Streams with
WebRTC signaling channel using the Amazon SDK for JavaScript v2. The syntax
will differ from other Amazon SDKs, but the general flow will be
the same. View a complete code example on GitHub.
Create the Kinesis Video Streams client. This is the client used to
call the CreateSignalingChannel
API.
const clientConfig = {
accessKeyId: 'YourAccessKey
',
secretAccessKey: 'YourSecretKey
',
region: 'us-west-2
'
};
const kinesisVideoClient = new AWS.KinesisVideo(clientConfig);
Use the client to call the CreateSignalingChannel
API.
const createSignalingChannelResponse = await kinesisVideoClient
.createSignalingChannel({
ChannelName: 'YourChannelName
',
})
.promise();
Print the response.
console.log(createSignalingChannelResponse.ChannelARN);
The live web page with this code sample is available for use on GitHub. Input your region, Amazon credentials, and the name of
your signaling channel.
Select Create Channel.