Kinesis Video Streams service quotas - Amazon Kinesis Video Streams

Kinesis Video Streams service quotas

Kinesis Video Streams has the following service quotas:

Important

The following service quotas are either soft [s], which can be upgraded by submitting a support ticket, or hard [h], which can't be increased. You will see [s] and [h] next to individual service quota in the tables below.

Control plane API service quotas

The following section describes service quotas 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 service quotas
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.

N/A 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.
DeleteEdgeConfiguration 10 TPS [h] N/A 1 TPS [h]
DeleteStream 50 TPS [h] N/A 5 TPS [h]
DescribeEdgeConfiguration 50 TPS [h] N/A 5 TPS [h]
DescribeImageGenerationConfiguration 50 TPS [h] N/A 5 TPS [h]
DescribeMappedResourceConfiguration 50 TPS [h] N/A 5 TPS [h]
DescribeNotificationConfiguration 50 TPS [h] N/A 5 TPS [h]
DescribeStream 300 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.
ListEdgeAgentConfigurations 50 TPS [h] N/A N/A
ListStreams 50 TPS [h] N/A N/A
ListTagsForStream 50 TPS [h] N/A 5 TPS [h]
StartEdgeConfigurationUpdate 10 TPS [h] N/A 1 TPS [h]
TagStream 50 TPS [h] N/A 5 TPS [h]
UntagStream 50 TPS [h] N/A 5 TPS [h]
UpdateDataRetention 50 TPS [h] N/A 5 TPS [h]
UpdateImageGenerationConfiguration 50 TPS [h] N/A 5 TPS [h]
UpdateNotificationConfiguration 50 TPS [h] N/A 5 TPS [h]
UpdateStream 50 TPS [h] N/A 5 TPS [h]

Media and archived-media API service quotas

The following section describes service quotas 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 service quotas
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] per stream
  • 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 fragments sent per second: 5 [h]

  • Maximum fragment metadata limit: 10 tags [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 quotas, the last connection is accepted.
GetClip N/A N/A 100 MB size limit [h] Maximum number of fragments: 200 [h]
GetDASHStreamingSessionURL 25 TPS [h] N/A N/A N/A
GetHLSStreamingSessionURL 25 TPS [h] N/A N/A N/A
GetImages N/A N/A 100 MB [h] N/A

Maximum number of images per request is 100 [h].

Note

The minimum value for SamplingInterval is 200 milliseconds (ms), which is 5 images per second.

GetMedia 5 TPS [h] 3 [s] 25 MB/s or 200 Mbps [s] Maximum fragments sent per second: 6 [h]

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.

Note

GetMedia isn't used for HLS/DASH playback.

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 invoke GetMediaForFragmentList. Further connections are rejected.
Video playback protocol API service quotas
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 Shared quota (N)
ListFragments Value of the MaxResults parameter 10000 quota points per second, per stream [h]
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 Shared quota (N)
GetMediaForFragmentList Number of fragments in the Fragments parameter 500 quota points per second, per stream [h]
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 Amazon Kinesis Video Streams.

Fragment metadata quotas

The following service quotas apply to adding fragment metadata to fragments in a Kinesis video stream:

  • You can prepend up to 10 metadata items to a fragment.

  • A fragment metadata name can be up to 128 bytes in length.

  • A fragment metadata value can be up to 256 bytes in length.

  • A fragment metadata name can't begin with the string "AWS". If such a metadata item is added, the putFragmentMetadata method in the PIC returns a STATUS_INVALID_METADATA_NAME error (error code 0x52000077). Your application can then either ignore the error (the PIC doesn't add the metadata item), or respond to the error.

Stream tags

These metadata key-value pairs apply to the overall Kinesis Video Streams resource, not individual fragments contained within a Kinesis video stream.

Each Kinesis video stream supports up to 50 tags.

See TagStream for restrictions on the keys and values of stream tags.