Using Amazon EventBridge with Amazon Interactive Video Service - Amazon Interactive Video Service

Using Amazon EventBridge with Amazon Interactive Video Service

You can use Amazon EventBridge to monitor your Amazon Interactive Video Service (IVS) streams.

Amazon IVS sends change events about the status of your streams to Amazon EventBridge. You can create EventBridge rules for any of the following events.

Event Type Event Sent When ...
IVS Stream State Change Stream Start A stream is being processed and segments are available for the viewer to watch.
IVS Stream State Change Stream End A stream stops being processed and no longer produces segments for the viewer.
IVS Stream State Change Stream Failure A stream is not being processed and is not available because processing capacity was exceeded.
IVS Stream Health Change Starvation Start A stream is not receiving data from the streamer; the stream is said to be in “starvation.”
IVS Stream Health Change Starvation End A starving stream begins receiving data from the streamer and the stream is healthy again.
IVS Limit Breach Ingest Bitrate The incoming stream’s bitrate exceeds the Amazon IVS limit.
IVS Limit Breach Ingest Resolution The incoming stream’s resolution exceeds the Amazon IVS limit.
IVS Limit Breach Concurrent Broadcasts The total number of channels streaming at the same time exceeds the Amazon IVS limit.
IVS Limit Breach Concurrent Viewers The total number of viewers watching your channels at the same time exceeds the Amazon IVS limit.

Note on stream IDs: The stream_id field (in many events) is a unique stream identifier assigned each time a channel goes live. For a given channel, each live stream has a new stream_id. Hence, each channel ARN can have many corresponding stream IDs. Stream IDs allow customers to distinguish different stream sessions on the same channel.

Creating Amazon EventBridge Rules for Amazon IVS

You can create a rule that triggers on an event emitted by Amazon IVS. Follow the steps in Creating an EventBridge Rule That Triggers on an Event from an AWS Resource in the Amazon EventBridge User Guide. When you need to select a Service name, choose Interactive Video Service (IVS).

Examples: Stream State Change

Stream Start: This event is sent when a stream is being processed and segments are available for the viewer.

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Stream State Change", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [ "arn:aws:ivs:us-east-1:aws_account_id:channel/12345678-1a23-4567-a1bc-1a2b34567890" ], "detail": { "event_name": "Stream Start", "channel_name": "Your Channel", "stream_id": "st-1F6jDj0t3zV01cXKe5dScIJ" } }

Stream End: This event is sent when a stream stops being processed and no longer produces segments for the viewer.

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Stream State Change", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [ "arn:aws:ivs:us-east-1:aws_account_id:channel/12345678-1a23-4567-a1bc-1a2b34567890" ], "detail": { "event_name": "Stream End", "channel_name": "Your Channel", "stream_id": "st-1F6jDj0t3zV01cXKe5dScIJ" } }

Stream Failure: This event is sent when a stream is not being processed and is not available because processing capacity was exceeded.

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Stream State Change", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [ "arn:aws:ivs:us-east-1:aws_account_id:channel/12345678-1a23-4567-a1bc-1a2b34567890" ], "detail": { "event_name": "Stream Failure", "channel_name": "Your Channel", "stream_id": "st-1F6jDj0t3zV01cXKe5dScIJ", "reason": "Transcode capacity exceeded. Please try again." } }

Examples: Stream Health Change

Starvation Start: This event is sent when a stream is not receiving data from the streamer; the stream is said to be in “starvation.”

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Stream Health Change", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [ "arn:aws:ivs:us-east-1:aws_account_id:channel/12345678-1a23-4567-a1bc-1a2b34567890" ], "detail": { "event_name": "Starvation Start", "channel_name": "Your Channel", "stream_id": "st-1F6jDj0t3zV01cXKe5dScIJ" } }

Starvation End: This event is sent when a starving stream begins receiving data from the streamer and the stream is healthy again.

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Stream Health Change", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [ "arn:aws:ivs:us-east-1:aws_account_id:channel/12345678-1a23-4567-a1bc-1a2b34567890" ], "detail": { "event_name": "Starvation End", "channel_name": "Your Channel", "stream_id": "st-1F6jDj0t3zV01cXKe5dScIJ" } }

Examples: Limit Breach

All limit-breach events include the name of the limit that is breached, the value of the limit, and the number by which the limit was exceeded (value at breach subtracted by the limit).

Ingest Bitrate: This event is sent when the incoming stream’s bitrate exceeds the Amazon IVS limit.

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Limit Breach", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [ "arn:aws:ivs:us-east-1:aws_account_id:channel/12345678-1a23-4567-a1bc-1a2b34567890" ], "detail": { "limit_name": "Ingest Bitrate", "limit_value": 1234, "exceeded_by": 3, "limit_unit": "bits per second", "channel_name": "Your Channel", "stream_id": "st-1F6jDj0t3zV01cXKe5dScIJ" } }

Ingest Resolution: This event is sent when the incoming stream’s resolution (total pixels or pixels per edge) exceeds the Amazon IVS limits.

Maximum total pixels exceeded:

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Limit Breach", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [ "arn:aws:ivs:us-east-1:aws_account_id:channel/12345678-1a23-4567-a1bc-1a2b34567890" ], "detail": { "limit_name": "Ingest Resolution", "limit_value": 495000, "exceeded_by": 426600, "limit_unit": "total pixels", "channel_name": "Your Channel", "stream_id": "st-1F6jDj0t3zV01cXKe5dScIJ" } }

Maximum pixels per edge exceeded:

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Limit Breach", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [ "arn:aws:ivs:us-east-1:aws_account_id:channel/12345678-1a23-4567-a1bc-1a2b34567890"TBD ], "detail": { "limit_name": "Ingest Resolution", "limit_value": 855, "exceeded_by": 45, "limit_unit": "pixels per edge", "channel_name": "Your Channel", "stream_id": "st-1F6jDj0t3zV01cXKe5dScIJ" } }

Concurrent Broadcasts: This event is sent when the total number of channels streaming at the same time exceeds the Amazon IVS limit.

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Limit Breach", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [], "detail": { "limit_name": "Concurrent Broadcasts", "limit_value": 2, "exceeded_by": 3, "limit_unit": "active streams" } }

Concurrent Viewers: This event is sent when the total number of viewers watching your channels at the same time exceeds the Amazon IVS limit.

{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "IVS Limit Breach", "source": "aws.ivs", "account": "aws_account_id", "time": "2017-06-12T10:23:43Z", "region": "us-east-1", "resources": [], "detail": { "limit_name": "Concurrent Viewers", "limit_value": 10, "exceeded_by": 11, "limit_unit": "viewers" } }