Launched in 2006, Prime Video is a subscription-based, on-demand over-the-top streaming service, offered as part of a Prime subscription or as a stand-alone service. For years, the company has relied on dozens of personalization services to recommend new content to its customers. One of these services uses offline workflows that run periodically and provides insights and recommendations every 2–3 days.
Wanting to improve the efficiency and performance of this particular personalization service, Prime Video turned to Amazon Web Services (AWS). It adopted AWS Lambda, a serverless, event-driven compute service, to build a new workflow that delivers near-real-time recommendations. This event-driven process was seamlessly placed on top of Prime Video’s existing offline workflows, enhancing the user experience for both frequent and casual customers alike.
Opportunity | Using AWS Lambda to Accelerate Content Recommendations for Prime Video
With more than 200 million Prime members worldwide, Prime Video offers a vast catalog of movies and television shows tailored to individual tastes. Categories like “movies we think you will like” or “new release movies” are more than just friendly suggestions: they are outcomes of a machine learning (ML) model designed using Machine Learning on AWS—a comprehensive set of artificial intelligence and ML services—that assesses a customer’s likelihood of engagement based on past streaming behavior.
“With our offline personalization service, the home page often wouldn’t reflect a customer’s latest viewing history,” says Hani Suleiman, senior principal engineer at Prime Video. “We wanted to create a solution where the home page understands what you just watched and provides other recommendations that are suited to your tastes.”
Running offline jobs so frequently was inefficient and created unnecessary waste for Prime Video. At the same time, the offline workflows didn’t deliver recommendations as close to real time as the team would have liked. It was clear that a more dynamic runtime solution was needed. So, Prime Video embarked on a mission to keep pace with customers’ actions and preferences.
To bring its recommendations as close to real time as possible, Prime Video devised an event-driven architecture based on AWS Lambda; this workflow scales based on the number of customer playback events rather than the number of requests to the recommendation service. With an event-driven architecture, the team could deliver recommendations in near real time, improving engagement.
With our serverless, event-driven architecture on AWS, customers can now receive better recommendations earlier.”
Senior Principal Engineer, Prime Video
Solution | Serving Personalized Content to More Than 200 Million Customers in Near Real Time
An AWS Lambda function initiates the personalization workflow whenever a customer performs a key action on Prime Video, such as streaming a new movie or television show. To ingest these events, Prime Video uses an existing event stream on Amazon Kinesis Video Streams, which captures, processes, and stores media streams for playback, analytics, and ML.
Then, ML inferences are processed in near real time while the customer is watching the content. When customers return to the Prime Video home page, they can explore content recommendations based on what they just watched.
With serverless architecture, Prime Video can scale up by orders of magnitude throughout the day, meeting demand during peak hours in a given territory. “The amount of traffic that we get at 3:00 a.m. is very different from the traffic at 8:00 p.m.,” says Suleiman. “Using AWS Lambda, we do not have to worry about accommodating these fluctuations. It automatically scales based on our traffic needs.”
On AWS, Prime Video has dramatically reduced development work and simplified scaling and operations. “We no longer have to manage security campaigns, perform operating system upgrades, or replace hosts,” says Suleiman. “AWS Lambda takes care of all that for us. Even though the team now owns new code and a new service, we haven’t increased our operational burden.” The event-driven workflow is also 25 percent cheaper in compute costs compared with alternative architecture designs evaluated by the team.
Outcome | Deepening Engagement with Intuitive, Responsive Home Page Recommendations
With Prime Video using AWS, its customers can now browse the most relevant content with near-real-time personalization. At the same time, the offline workflows ensure that customers receive the benefit of personalized recommendations regardless of how frequently they stream. And with its independent, event-driven workflow on AWS, Prime Video can add new signals and enrich the ML model without increasing end-to-end latency, maintaining near-real-time recommendations.
“We have effectively added an incremental process on top of our existing batch process,” says Suleiman. “With our serverless, event-driven architecture on AWS, customers can now receive better recommendations earlier.”
Through this project, Prime Video has deepened and enriched the customer experience. The new workflow can update the model’s learned representation of a customer within seconds of them watching a movie or television show, so that it’s ready for customers to explore new titles when they return to the home page.
To effectively gauge the value of the new recommendation engine, Prime Video conducted an A/B test to compare the impact of updating recommendations after every stream instead of once per day. The results were remarkable, demonstrating a substantial improvement in the user experience, characterized by enhanced responsiveness. As a result of implementing this new workflow, the team observed a material improvement across all customer segments, including both the most active and least active users.
“There are dozens of recommendation algorithms out there, and other than the one that we built on AWS Lambda, none of them can react to new customer events in near real time at such a massive scale,” says Suleiman. “We will continue to use this solution across Prime Video’s personalization services to provide more timely recommendations to customers.”
About Prime Video
Prime Video is a subscription-based, on-demand over-the-top streaming service, offered as part of a Prime subscription or as a stand-alone service. Launched in 2006, it has over 200 million customers.
AWS Services Used
AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers.
Amazon Kinesis Video Streams
Amazon Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for analytics, machine learning (ML), playback, and other processing.
Machine Learning on AWS
Get deeper insights from your data while lowering costs with AWS machine learning (ML). AWS helps you at every stage of your ML adoption journey with the most comprehensive set of artificial intelligence (AI) and ML services, infrastructure, and implementation resources.
Learn more »
Organizations of all sizes across all industries are transforming their businesses and delivering on their missions every day using AWS. Contact our experts and start your own AWS journey today.