Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

squadrun/lambda-concatenate-audios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

lambda-concatenate-audios

We had this not-so-unique usecase where in we had a couple of URLs that pointed to mp3 recordings. We wanted to aggregate these into one recording and save them to our S3 bucket from which we could fetch the recording (and use it in our android app).

We had the following ways to do it:

  1. Download the audios from the URLs, merge them, and upload them to S3.
  2. Download the audios from the URLs, upload them to S3. Make Lambda join/merge these audios and save the final audio in another S3 bucket.
  3. (cool way) Lambda downloads the audios, merges them, and saves the final audio to S3.

We, of course, decided to take the cool way because anything else wasn't challenging enough (actually because this was the most efficient way, as it allowed our server to take zero load for this function).

How it works:

  1. Set up Lambda from here. Skip blueprint.
  2. Copy code from aggregate_audios.py to the lambda code editor.
  3. Set your role to S3 execution role and set up permissions to include AmazonS3FullAccess.
  4. Use the code in invoke_lambda.py to invoke your lambda function.

About

Fetch audio files from URL, join them and save them to S3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages