Kinesis Video Streams Limits - Amazon Kinesis Video Streams

Kinesis Video Streams Limits

Kinesis Video Streams has the following limits:

The limits below are either soft [s], which can be upgraded by submitting a support ticket, or hard [h], which can't be increased.

Control-plane API limits

The following section describes limits for Control Plane APIs. TPS stands for transactions per second.

When an account-level or resource-level Request limit is reached, a ClientLimitExceededException is thrown.

Control Plane API limits
API Account Limit: Request Account Limit: Streams Stream-level limit Relevant Exceptions and Notes
CreateStream 50 TPS [s] 2500 streams per account [s] in US East (N. Virginia) and US West (Oregon) regions. 1000 streams per account [s] in all other supported regions.
Note

This limit can be increased up to 100,000 (or more) streams per account [s]. Sign in to the AWS Management Console at https://console.aws.amazon.com/ and submit a service limit increase case for Kinesis Video Streams to request an increase of this limit.

Devices, CLIs, SDK-driven access, and the console can all invoke this API. Only one API call succeeds if the stream doesn’t already exist.
DescribeStream 300 TPS [h] N/A 5 TPS [h]
UpdateStream 50 TPS [h] N/A 5 TPS [h]
ListStreams 50 TPS [h] N/A
DeleteStream 50 TPS [h] N/A 5 TPS [h]
GetDataEndpoint 300 TPS [h] N/A 5 TPS [h] Called every 45 minutes to refresh the streaming token for most PutMedia/GetMedia use cases. Caching data endpoints is safe if the application reloads them on failure.
UpdateDataRetention 50 TPS [h] N/A 5 TPS [h]
TagStream 50 TPS [h] N/A 5 TPS [h]
UntagStream 50 TPS [h] N/A 5 TPS [h]
ListTagsForStream 50 TPS [h] N/A 5 TPS [h]

Media and archived-media API limits

The following section describes limits for Media and Archived Media APIs.

When an account-level or resource-level Request limit is reached, a ClientLimitExceededException is thrown.

When a connection-level limit is reached, a ConnectionLimitExceededException is thrown.

The following errors or acks are thrown when a fragment-level limit is reached:

  • A MIN_FRAGMENT_DURATION_REACHED ack is returned for a fragment below the minimum duration.

  • A MAX_FRAGMENT_DURATION_REACHED ack is returned for a fragment above the maximum duration.

  • A MAX_FRAGMENT_SIZE ack is returned for a fragment above the maximum data size.

  • A FragmentLimitExceeded exception is thrown if a fragment limit is reached in a GetMediaForFragmentList operation.

Data Plane API limits
API Stream-level limit Connection-level limit Bandwidth limit Fragment-level limit Relevant Exceptions and Notes
PutMedia 5 TPS [h] 1 [s] 12.5 MB/second, or 100 Mbps [s]
  • Minimum fragment duration: 1 second [h]

  • Maximum fragment duration: 20 seconds [h]

  • Maximum fragment size: 50 MB [h]

  • Maximum number of tracks: 3 [s]

A typical PutMedia request contains data for several seconds, resulting in a lower TPS per stream. In the case of multiple concurrent connections that exceed limits, the last connection is accepted.
GetHLSStreamingSessionURL 25 TPS [h] N/A N/A N/A
GetDASHStreamingSessionURL 25 TPS [h] N/A N/A N/A
GetMedia 5 TPS [h] 3 [s] 25 MB/s or 200 Mbps [s] N/A

Only three clients can concurrently receive content from the media stream at any moment of time. Further client connections are rejected. A unique consuming client shouldn’t need more than 2 or 3 TPS because after the connection is established, we anticipate that the application will read continuously.

If a typical fragment is approximately 5 MB, this limit means ~75 MB/ sec per Kinesis video stream. Such a stream would have an outgoing bitrate of 2x the streams' maximum incoming bitrate.

GetMediaForFragmentList N/A 5 [s] 25 MB/s or 200 Mbps [s] Maximum number of fragments: 1000 [h] Five fragment-based consuming applications can concurrently get media. Further connections are rejected.
GetClip N/A N/A 100 MB size limit [h] Maximum number of fragments: 200 [h]
Video Playback Protocol API limits
API Session-level limit Fragment-level limit
GetDASHManifestPlaylist 5 TPS [h] Maximum number of fragments per playlist: 5000 [h]
GetHLSMasterPlaylist 5 TPS [h] N/A
GetHLSMediaPlaylist 5 TPS [h] Maximum number of fragments per playlist: 5000 [h]
GetMP4InitFragment 5 TPS [h] N/A
GetMP4MediaFragment 20 TPS [h] N/A
GetTSFragment 20 TPS [h] N/A

Fragment-metadata and fragment-media quotas

Kinesis Video Streams APIs for accessing archived media are throttled based on the number of fragments requested rather than the number of API calls. APIs are rate-limited by both the number of fragment metadata and the number of fragment media that is requested. The fragment metadata and fragment media quotas are applied per stream. In other words, requests for fragment metadata or media in one stream don't apply to the quotas of another stream. However, within a given stream, each quota is shared across multiple APIs. This means that, for a given stream, requests for fragments across different APIs consume from the same quota. When either the fragment metadata or fragment media quota for a stream is exceeded, the API returns a ClientLimitExceededException. The following tables show how the APIs consume from each of the two types of quota. For the second column in these tables, assume that if a stream has a quota of N, that means the APIs have N points to consume from that quota type for that stream. The GetClip API appears in both tables.

Fragment metadata quota consumption
API Number of quota points consumed per request
ListFragments Value of the MaxResults parameter
GetClip Number of fragments in the resulting clip
GetHLSMediaPlaylist Value of the MaxMediaPlaylistFragmentResults parameter
GetDASHManifest Value of the MaxManifestFragmentResults parameter
Fragment media quota consumption
API Number of quota points consumed per request
GetMediaForFragmentList Number of fragments in the Fragments parameter
GetClip Number of fragments in the resulting clip
GetMP4MediaFragment 1
GetTSFragment 1

For example, with a quota of 500 fragment media per second, the following call patterns for a particular stream are supported:

  • 5 requests per second to GetClip with 100 fragments in each clip.

  • 100 requests per second to GetClip with 5 fragments in each clip.

  • 2 requests per second to GetClip with 100 fragments in each clip and 3 requests per second to GetMediaForFragmentList in each clip.

  • 400 requests per second to GetMP4MediaFragment and 100 requests per second to GetTSFragment.

These quotas have an important implication regarding the number of HLS and MPEG-DASH sessions that can be supported per stream. There is no limit to the number of HLS and DASH sessions that can be in use by media players at a given time. Therefore, it is important that the playback application not allow too many sessions to be in use concurrently. The following are two examples of how to determine the number of concurrent playback sessions that can be supported:

Example 1: Live Streaming

In a live streaming scenario with HLS with 1 second duration fragments, an audio and video track, and MaxMediaPlaylistFragmentResults set to 5, a media player typically makes 2 calls to GetHLSMediaPlaylist per second: one call for the latest video metadata and another for the corresponding audio metadata. The two calls consume 5 fragment metadata quota points each. It also makes 2 calls to GetMP4MediaFragment per second: one call for the latest video and another for the corresponding audio. These two calls consume a total of 2 fragment media quota points. In this scenario, up to 125 concurrent playback sessions can be supported. With 250 sessions, this scenario consumes 2,500 fragment metadata quota points per second (well below the 10,000 quota) and 500 fragment media quota points per second.

Example 2: On-Demand Playback

In an on-demand playback scenario of a past event with MPEG-DASH, an audio and video track and MaxManifestFragmentResults set to 1,000, a media player typically calls GetDASHManifest once at the start of the session (consuming 1,000 fragment metadata quota points) and it calls GetMP4MediaFragment at a rate of up to 5 times per second (consuming 5 fragment media quota points) until all fragments are loaded. In this scenario, up to 10 new sessions can be started per second (right at the 10,000 fragment metadata per second quota), and up to 100 sessions can be actively loading fragment media at a rate of 5 per second (right at the 500 fragment media per second quota).

You can use ArchivedFragmentsConsumed.Metadata and ArchivedFragmentsConsumed.Media to monitor the consumption of fragment metadata and fragment media quota points, respectively. For information about monitoring, see Monitoring Kinesis Video Streams.