Kinesis Video Streams limits - Amazon Kinesis Video Streams

Kinesis Video Streams limits

Kinesis Video Streams has the following limits:

The following limits 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] 10000 streams per account [s] in US East (N. Virginia) and US West (Oregon) Regions. 5000 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]
DescribeImageGenerationConfiguration 50 TPS [h] N/A 5 TPS [h]
UpdateImageGenerationConfiguration 50 TPS [h] N/A 5 TPS [h]
DescribeNotificationConfiguration 50 TPS [h] N/A 5 TPS [h]
UpdateNotificationConfiguration 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]

  • Maximum of 5 fragments sent per second [h]

A typical PutMedia request contains data for several seconds, resulting in a lower TPS per stream. If there are 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]

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 two or three TPS because after the connection is established, the application should read continuously.

If a typical fragment is approximately 5 MB, this limit means ~75 MBps 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]
GetImages N/A N/A 100 MB [h] N/A Maximum number of images per request is 100 [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's 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
GetImages Value of 400 + max number of images requested
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
GetImages Max number of images requested

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's no limit to the number of HLS and DASH sessions that can be in use by media players at a given time. Therefore, it's important that the playback application doesn't allow too many sessions to be in use concurrently. The following two examples describe 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 five, a media player typically makes two calls to GetHLSMediaPlaylist per second. One call is for the latest video metadata and another for the corresponding audio metadata. The two calls consume five fragment metadata quota points each. It also makes two calls to GetMP4MediaFragment per second: one call for the latest video and another for the corresponding audio. Each call consumes a single fragment media token, so two tokens are consumed in total.

In this scenario, up to 250 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.