Files
floci/docs/services/kinesisvideo.md
T
nsandroni 3f881a6e24 feat(kinesisvideo): add stream lifecycle (CreateStream, DeleteStream, DescribeStream, ListStreams) (#9586)
Adds Amazon Kinesis Video Streams (kinesisvideo, REST JSON, 2017-09-30)
with the stream lifecycle control plane: CreateStream, DescribeStream,
ListStreams and DeleteStream, stored per account and Region.

A stream's ARN ends with its creation time in milliseconds and is
distinct for every stream, even one recreated within the same
millisecond, and its KmsKeyId defaults to alias/aws/kinesisvideo.
ListStreams pages by the last returned name, so deleting between pages
skips nothing. Requests are checked against the constraints of the
botocore model, vendored by tools/aws/regen_kinesisvideo_shapes.py, and
refusals carry the codes and wording AWS sends.

Under IAM enforcement every request is checked as its kinesisvideo:
action on the stream it names, read through the stream's stored ARN and
tags, and a tagged CreateStream also needs kinesisvideo:TagStream. The
IAM data comes from the generators.

A stream is ACTIVE as soon as CreateStream returns, and DeleteStream
removes it at once, where AWS passes through CREATING and DELETING.
2026-11-30 07:14:25 -04:00

4.2 KiB

Kinesis Video Streams

Floci implements the REST JSON control plane of Amazon Kinesis Video Streams for the stream lifecycle: creating, describing, listing and deleting video streams. Requests are signed for kinesisvideo and served at the same endpoint as every other service.

Supported Actions

Action Description
CreateStream Creates a video stream and returns its ARN.
DeleteStream Deletes a stream by ARN, checking CurrentVersion when it is given.
DescribeStream Returns a stream's StreamInfo, by StreamName or StreamARN.
ListStreams Lists the streams of the Region, filtered by StreamNameCondition and paginated.

Behavior

  • A stream is ACTIVE as soon as CreateStream returns. AWS passes through CREATING first.
  • DeleteStream removes the stream at once, so DescribeStream returns ResourceNotFoundException right after it. AWS passes through DELETING first.
  • The stream ARN has the AWS shape arn:<partition>:kinesisvideo:<region>:<account>:stream/<name>/<creation time in milliseconds>. An ARN of a deleted stream does not match a stream later created with the same name.
  • Without KmsKeyId, StreamInfo.KmsKeyId is the ARN of the AWS managed key alias alias/aws/kinesisvideo.
  • DataRetentionInHours defaults to 0, which AWS reads as no retention.
  • Version is generated at creation. DeleteStream returns VersionMismatchException when CurrentVersion differs from it.
  • Creating a stream whose name exists in the account and Region returns ResourceInUseException.
  • Requests are checked by RequestConstraintCheck against the member types, required members, lengths, patterns and enum values generated from botocore's Kinesis Video model, such as the StreamName and DeviceName pattern ([a-zA-Z0-9_.-]+), the MediaType pattern, the Version pattern of CurrentVersion, the ResourceARN pattern of StreamARN, the 1 to 10000 range of MaxResults and the BEGINS_WITH value of ComparisonOperator. tools/aws/regen_kinesisvideo_shapes.py vendors them; make aws-data-sync regenerates them and make aws-data-check checks for drift. A member of the wrong JSON type fails with SerializationException, more than the 50 tags the model allows with TagsPerResourceExceededLimitException, and any other violation with InvalidArgumentException. A DescribeStream naming neither StreamName nor StreamARN, or both even when they agree, and a NextToken that ListStreams did not return, also fail with InvalidArgumentException, in the wording AWS uses.

IAM

Under IAM enforcement (floci.services.iam.enforcement-enabled), each request is checked as its kinesisvideo: action, from the routes and request resources generated from botocore and the AWS Service Reference. DescribeStream and DeleteStream are checked on the stream they name, a DescribeStream by StreamName on the ARN the stream is stored under, creation time included, and aws:ResourceTag/<key> reads the tags the stream was created with; ListStreams acts on no resource type and is checked on *, and a CreateStream with Tags also needs kinesisvideo:TagStream, with its tags as aws:RequestTag/<key> and aws:TagKeys. A refusal is AccessDeniedException with the 401 status the model declares for the service.

Not implemented

Media ingestion and playback (GetDataEndpoint and the kinesis-video-media and kinesis-video-archived-media data planes), signaling channels, stream updates, tagging actions, and the image generation, notification, edge and storage configuration actions are not emulated yet.

Example

export AWS_ENDPOINT_URL=http://localhost:4566

aws kinesisvideo create-stream --stream-name camera-1 --media-type video/h264 --data-retention-in-hours 24
aws kinesisvideo describe-stream --stream-name camera-1
aws kinesisvideo list-streams
aws kinesisvideo delete-stream --stream-arn "$(aws kinesisvideo describe-stream --stream-name camera-1 \
    --query StreamInfo.StreamARN --output text)"

See the Kinesis Video Streams API Reference.