Download static FFmpeg and create AWS Lambda layer
As said in the introduction, we are going to use FFmpeg to convert our MP4 and MP3 files to HLS format. We need to download the static build of ffmpeg and create an AWS Lambda layer where the ffmpeg binary will be uploaded for use by the AWS Lambda function.
Go to https://johnvansickle.com/ffmpeg/ and download an amd64 release of the ffmpeg. Extract the tar file to reveal the ffmpeg executable.
Create a zip file containing only the ffmpeg executable and the license file (GPLv3.txt)
Go to AWS console, create a layer with the same Python runtime version as you have installed in your development environment. Upload the zip file to your layer and write down the version ARN (AWS Resource Name) of your layer.