This Guidance demonstrates how to use Amazon Kinesis Video Streams with WebRTC to enable low-latency, bi-directional, peer-to-peer video streaming from home surveillance cameras. Kinesis Video Streams, a managed service for real-time video processing, can store video and other media files for replay and analytics, while WebRTC facilitates direct, low-latency connections between the camera and client applications. This Guidance allows seamless, responsive home monitoring from mobile devices or web browsers, as the peer-to-peer WebRTC connection minimizes latency and bandwidth compared to traditional client-server streaming. It also includes sample applications with the included software development kit (SDK). Camera manufacturers and connected home providers can use the SDK as a starting point to build custom camera management and viewing experiences. This helps them to more easily integrate high-quality, low-latency video capabilities into their connected home offerings and provides consumers with a reliable home monitoring experience.

Please note: [Disclaimer]

Architecture Diagram

Download the architecture diagram PDF 
  • Live View Smart Home Surveillance Cameras
  • This architecture diagram shows how use Kinesis Video Streams for WebRTC, allowing for the low-latency, bi-directional, peer-to-peer streaming of video from home surveillance cameras.

  • Smart Home Surveillance Camera
  • This architecture diagram shows how to stream video from smart home cameras to Kinesis Video Streams for storage, playback, and analytics. It also shows how to send push notifications to mobile application users to notify them of events.

Well-Architected Pillars

The AWS Well-Architected Framework helps you understand the pros and cons of the decisions you make when building systems in the cloud. The six pillars of the Framework allow you to learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems. Using the AWS Well-Architected Tool, available at no charge in the AWS Management Console, you can review your workloads against these best practices by answering a set of questions for each pillar.

The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.

  • This Guidance uses Kinesis Video Streams and AWS IoT Core, which allow users to identify ways of optimizing the location event ingestion workflow and ensure the workflow can scale in the event of a large influx of new events. For instance, Kinesis Video Streams sends metrics to Amazon CloudWatch, giving users visibility into video streaming data. In addition, AWS IoT Core sends metrics to CloudWatch to monitor incoming messages and alerts when ingestion stops or slows, indicating possible network or other issues. AWS IoT Core also provides fleet management capabilities to give operators insights into connected camera status.

    Read the Operational Excellence whitepaper 
  • AWS Identity and Access Management (IAM) policies scope permissions for the required AWS services to the minimum level. Kinesis Video Streams allows scoping permissions to authorized users and devices; it also protects data at rest with AWS Key Management Service (AWS KMS) and in transit with TLS. Moreover, AWS IoT Core policies control device access to MQTT topics and cloud interactions. Finally, Amazon Cognito provides authentication and authorization controls for mobile applications.

    Read the Security whitepaper 
  • Serverless services designed across multiple Availability Zones (AZs) provide resilience against a number of failures. Specifically, it helps to ensure data ingestion into AWS IoT Core, processing by Lambda, and storage in Amazon S3, which offers versioning, object lock, and lifecycle configuration for reliability.

    DynamoDB provides features like on-demand backup, point-in-time recovery, and global tables for data sync. Also, Kinesis Video Streams is built on AWS Regions and AZs, which offer low-latency, high-throughput, and highly redundant networking. This allows applications and databases to automatically failover between AZs with higher availability, fault tolerance, and scalability than traditional data centers.

    Read the Reliability whitepaper 
  • AWS IoT Core scales to accommodate increasing message ingestion while offering low latency. Lambda enables the configuration of concurrency reservations to reduce cold start times and enhance performance. And Kinesis Video Streams automatically provisions and scales all the necessary infrastructure to ingest streaming video data from millions of devices.

    Read the Performance Efficiency whitepaper 
  • Kinesis Video Streams for WebRTC reduces the need for cloud-based video streaming through peer-to-peer connectivity while providing pay-as-you-go TURN service pricing when cloud streaming is required. AWS IoT Core scales pricing with usage, enabling ongoing cost optimization by identifying goals, measuring metrics, and making incremental improvements, aided by cost tagging and billing groups. Cloud storage with Amazon S3 enables agility and cost savings through unlimited scale, storage class selection, and features like the Amazon S3 Intelligent-Tiering storage class. Similarly, DynamoDB offers cost optimization through capacity modes, table classes, and cost allocation tags.

    Read the Cost Optimization whitepaper 
  • The majority of services comprising this Guidance are constructed using serverless technologies, thereby reducing the required compute footprint. For instance, Lambda will only execute when invoked by AWS IoT Core, and Amazon S3 can use more energy-efficient storage volumes for long-term media storage, such as thumbnail preview images. By building upon serverless services, the overall compute usage can be diminished, enabling the construction of a fully event-driven architecture that scales up and down with traffic demands, consuming less energy during periods of lower ingestion.

    Furthermore, employing Kinesis Video Streams eliminates the need to maintain steady-state applications running on instances, instead automatically provisioning and elastically scaling all the infrastructure required to ingest streaming video data from millions of devices.

    Read the Sustainability whitepaper 

Additional Resources

These additional resources can assist in the development of both camera-side applications as well as web and mobile applications. Included are links to the associated GitHub repositories containing example applications.

Disclaimer

The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.

References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.

Was this page helpful?