Cost-optimizing AssemblyAI speech-to-text inference on AWS with Amazon EC2 Spot

In one sentence

AssemblyAI reduced inference compute costs by 70% while maintaining SLA commitments by combining Amazon ECS, EC2 Spot Instances, and SQS queues.

Key points

  • AssemblyAI uses Amazon ECS capacity providers to combine an On-Demand baseline with Spot Instances across multiple NVIDIA GPU families (g4dn, g5, g6) for demand spikes.
  • Using Amazon SQS queues and an EventBridge-triggered Lambda handler, the system returns in-flight jobs to the queue for retry upon Spot interruption notices.
  • The architecture is independently deployed across multiple AWS Regions, including US West and Europe (London), to meet data residency requirements for regulated industries.
  • By running GPU Spot Instances in production, AssemblyAI achieved 70% cost savings on inference compute.

In depth

An AI-written overview of the original article, not the article itself.

A post on the AWS Machine Learning Blog details how speech-to-text platform AssemblyAI optimizes AI inference costs using Amazon EC2 Spot Instances. Despite a nearly 4x year-over-year surge in compute demand, the architecture achieved 70 percent cost savings compared to On-Demand pricing while maintaining service level agreements and data residency.

Hybrid Capacity and GPU Diversification

The post notes that speech-to-text inference requires thousands of continuously running GPU instances, making an all-On-Demand setup cost-prohibitive, while Spot Instances carry a 2-minute reclamation warning. AssemblyAI addresses this using Amazon ECS capacity providers that combine an On-Demand baseline with Spot capacity for demand spikes.

To minimize interruptions, the fleet diversifies across three NVIDIA GPU instance families: g4dn (NVIDIA T4), g5 (NVIDIA A10G), and g6 (NVIDIA L4). Using a price-capacity optimized allocation strategy, the system draws from the deepest, lowest-priced Spot pools.

Queue-Based Resilience and Data Residency

To handle Spot interruptions gracefully, AssemblyAI decouples job submission from execution with Amazon SQS. When a 2-minute interruption notice arrives, Amazon EventBridge triggers an AWS Lambda handler to return in-flight jobs to the queue for another healthy GPU instance to complete. Custom Amazon Machine Images help new instances recover in about 2 minutes.

For customers in regulated sectors such as healthcare, finance, and legal services, AssemblyAI deploys fully independent copies of this architecture across multiple AWS Regions, including US West (Oregon) and Europe (London), ensuring audio data stays within strict geographic boundaries.

Read originalOpens aws.amazon.com

This summary was generated by AI from the original article and may contain errors; the original is authoritative. Copyright belongs to the original author.

Recent stories from this source