Skip to main content

One post tagged with "lambda"

View All Tags

How to Stream Media Files from S3 Directly to AWS Lambda Using FFmpeg in Python

· 4 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Processing media files inside AWS Lambda can be a challenge due to its resource limits, lack of a local disk, and timeouts. However, it’s entirely possible to stream files directly from S3 into FFmpeg, process them on the fly, and avoid writing anything to disk.

In this guide, we’ll cover:

  • Streaming files from S3 into Lambda
  • Using ffmpeg with stdin and stdout in memory
  • Avoiding /tmp bottlenecks
  • Examples and production-ready patterns