lambda_function.py
is the Python lambda function for noise detect. It depends on ffmpeg
. This is installed at /opt/python/ffmpeg
in AWS.
To get FFMPEG installed, run install. This will download dependencies necesssary and create a python.zip
to be uploaded as an AWS Lambda Layer.
- Create a new Lambda function
- Copy the Lambda function into the function pane
- Create new layer and upload
python.zip
- Configure Lambda to use this layer
- Create REST ingress point
{
"body": {
"bucket_name": "bucket",
"key_name": "file.mkv",
"noise_tolerance": -36,
"noise_duration": 0.3
}
}
{
"statusCode": 200,
"data": {
"success": true,
"noise_detected": true,
"error": null
}
}