/amazon-ivs-qos-dashboard-timed-metadata-sample

Sample application for measuring the performance and audience experience of streaming video delivered via Amazon Interactive Video Service

Primary LanguageJavaScriptMIT No AttributionMIT-0

Amazon IVS Quality of Service Dashboard Sample

This is a sample application for use measuring the performance and audience experience for streaming video delivered via Amazon Interactive Video Service.

This application consists of an integration with the IVS player SDK to capture metrics from stream viewers. The metrics captured are used to report on viewer experience over time.

Captured metrics are delivered to AWS via API Gateway and Kinesis Firehose. Kinesis Firehose delivers the metrics to three destinations which can be used for exploration and to visualize the viewer experience

  • A Data Lake built on Amazon S3 and integrated with AWS Glue and Athena. Data stored in this location can be visualized using Amazon QuickSight.
  • Real time sliding window analysis is performed by Amazon Kinesis Analytics. Metrics calculated by this application are delivered to CloudWatch as metrics which can be used for operational dashboards and monitoring.
  • Optionally, metrics can also be delivered to an Amazon OpenSearch cluster for both near-real time and long-tail analysis using Kibana.

Deployment

  1. The demo deployment included with the solution is configured to use a publicly available IVS test stream. If you wish to use your own stream in the demo, review the IVS Getting Started guide and create a channel: https://docs.aws.amazon.com/ivs/latest/userguide/GSIVS.html
  2. Once the channel is created, note the Playback URL. You can retrieve this via the AWS CLI with the command:

aws ivs get-channel --arn [channel ARN]

  1. Deploy the cloudformation template either from one of the links below, or from folder: templates/deployment.yaml if you build the solution in your local dev environment (see below for build instructions)
  2. When prompted for the PlaybackURL Parameter at step 2 of the CloudFormation Stack Deployment, enter the IVS Stream Playback URL you identified in Step 2 for your streaming channel, or leave this at the default value.
  3. Once the CloudFormation template is deployed, navigate to the Output tab in CloudFormation as several settings are emitted here. You can open the demo app by clicking on the PlayerURL link.

Post Deployment

Enabling CloudWatch Dashboards

  1. To enable a CloudWatch dashboard, a pre-deployed Kinesis Analytics application needs to be turned on. To do so, navigate to the Amazon Kinesis Management Console.
  2. From the menu on the left, select Analytics Applications.
  3. Locate the Kinesis Analytics application deployed by the stack (it will be prefixed with the Stack Name). Select this and click on "Run"
  4. From the CloudFormation Output tab for the deployed stack, open the URL listed for the PlayerCWDashboard. This will take you to the CloudWatch Dashboard
  5. Start streaming to your IVS stream and open the demo app. The URL for the demo app is output as PlayerURL by the CloudFormation stack.
  6. Metrics will be captured and will be visible under CloudWatch within a few minutes

Enabling OpenSearch

  1. To configure delivery of metrics to OpenSearch, please see the OpenSearch Guide

Launching solution with Pre-built AWS CloudFormation Template

The solution is deployed using an AWS CloudFormation template with AWS Lambda backed custom resources. To deploy the solution, use one of the following CloudFormation templates and follows the instructions.

AWS Region AWS CloudFormation Template URL
EU (Ireland) Launch stack
US (N.Virginia) Launch stack
US (Oregon) Launch stack
Asia (Singapore) Launch stack
Asia (Sydney) Launch stack

High level solution components

Solution Components

Backend Architecture

Backend Architecture

Build Pre-requisites

Building this project requires the following dependencies to be installed on your build/development system:

Build Instructions

  1. Copy the Makefile.sample and edit the variables in the top section to define the appropriate resources in the AWS account you wish to deploy this to
  2. Save the file with the name: Makefile
  3. To create the S3 bucket to store the build artifacts, run the command: make creates3
  4. To build the artifacts and Cloudformation template to deploy the solution, run the command: make all

Quicksight Instructions

Once all the above steps are complete, to get your data into quicksights:

  1. Make sure Athena and S3 are working properly with the solution, you should see two buckets that have been created
    • ivsqosx01-log--
    • aws-athena-query-results--
  2. Once these buckets are populated with some data go to your AWS console and select Quicksight
  3. A new account may need to be created for quicksight to gain access from the AWS Console.
  4. Once you have opened up Quicksight, select Analyses item from the side menu
  5. In the top right corner select "New analysis"
  6. Select "New dataset" from the top left corner
  7. In the large list of available datasets select "Athena"
  8. Enter a name for your data source, leave the Athena workgroup as "primary"
  9. Keep the Catalog selection as "AwsDataCatalog"
    • In the Database section select the db generated by the QoS sample (ivsqosv01_qos_db or the name you have provided)
    • In the Tables sections select "Player logs"
  10. Either import to SPICE or directly query your data then select Visualize
  11. You can now select your visual type and select the data you may want to visualize.

Sample QuickSight Dashboard

Solution Components

Solution Components

Solution Components

Solution Components

Solution Components

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.