AWS IVS get notified for the stream start and stream end

552 Views Asked by At

I am Using AWS IVS (Interactive Video Service) for live streaming. I need the notification when the stream start and the stream ends. In the Amazon Event bridge, I have created a Rule. source as IVS and the target as a queue. but I am not getting the messages to the queue when the stream start and the stream ends. I am polling to the queue but the queue is empty. I think the event pattern in the Event Bridge is wrong. can someone help me to validate the event pattern below? or how to get notification when stream start or stream end from the AWS IVS?

{
  "source": [
    "aws.ivs"
  ],

  "detail": {
    "stream_status": [
      "Stream End",
      "Stream Start",
      "Session Created"
    ]
  }
}
2

There are 2 best solutions below

0
On

Imo, you have to manage it by yourself. AWS does not provide any automated messages when your IVS endpoint is ingesting data.

The best solution I've been thinking of right now is to have an observer pattern using websocket. The dirtier implementation would be to send a message using a websocket whenever your data source is streaming. This means that you have to trigger it somewhere with your interface if you're using another broadcasting service.

The best way would be a service checking your stream health and sessions regularly and notifying your clients whenever you have a live session, as well as providing info whenever your session health is dropping.

0
On

The EventBridge sample event had a bug where event_name was shown improperly as eventName. If you manually specify event_name, the events will properly fire and you should be good to use this rule for your needs.

Refer to the documentation here.