
While onboarding more streams to the service, we noticed that running the infrastructure at a high scale was very expensive. Marcin Kolny, senior software engineer at Prime Video, shares his team's assessment of the original architecture: After operating the solution for a while, they started running into problems as the architecture has proven to only support around 5% of the expected load. The team designed the distributed architecture to allow for horizontal scalability and leveraged serverless computing and storage to achieve faster implementation timelines. All audio/video data, including intermediate work items, were stored in AWS S3 buckets and an AWS SNS topic was used to deliver analysis results.

AWS step functions were used as a primary process orchestration mechanism, coordinating the execution of several lambda functions.

The microservices included splitting audio/video streams into video frames or decrypted audio buffers as well as detecting various stream defects by analyzing frames and audio buffers using machine-learning algorithms. The initial architecture of the solution was based on microservices responsible for executing steps of the overall analysis process, implemented on top of the serverless infrastructure stack. The Video Quality Analysis (VQA) team at Prime Video created the original tool for inspecting the quality of audio/video streams that was able to detect various user experience quality issues and trigger appropriate repair actions. It moved the workload to EC2 and ECS compute services, and achieved a 90% reduction in operational costs as a result. Prime Video, Amazon's video streaming service, has explained how it re-architected the audio/video quality inspection solution to reduce operational costs and address scalability problems.
