Set of scripts & lambda functions to sync Zoom recordings to S3 and build an http index.
Note: These scripts are provided as-is, and should not be considered production-ready. Among the deficiencies are limited documentation and missing tests.
To build and deploy these lambda functions, follow the instructions on Amazon:
https://docs.aws.amazon.com/lambda/latest/dg/python-package.html
Lambda script to sync recordings between a Zoom account and an S3 bucket. Can work with Zoom web hooks, on a schedule, or both. Script is designed so files can be rehosted from S3. Recordings are saved to S3 using their Zoom IDs with ContentDisposition set to a constructed filename.
The script requires several environment variables:
LOG_LEVEL
- INFO or DEBUGZOOM_ISS
- Zoom API Key (Named 'ISS' to match JWT spec)ZOOM_SECRET
- Zoom API SecretZOOM_WEBHOOK_AUTH
- Zoom webhook verification tokenZOOM_USER_EMAIL
- Email of the Zoom account to sync fromS3_BUCKET
- Name of the s3 bucket to sync toNEXT_LAMBDA
- If set, this lambda will be called when new videos are synced. Should be set to the name of the lambda function set up for the s3index script below.
The app uses JWT to authenticate to Zoom. You must sign up for a developer account, create an app, and generate the token key and secret. It also relies on the "New Recordings" event subscription, and will need the verification token.
Because the script can take time to run, it should be put behind an AWS Rest API Gateway. Follow instructions on Amazon:
https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-integration-async.html
Similarly, you'll want to forward the "Authorization" header through the API gateway so the lambda function has access.
Lambda script to read a given S3 bucket, find media files with the required metadata, and generate an HTML index with readable names and links.
The HTML template used to generate the index is included as a string in lambda_function.py
. Externalizing this file is left as an exercise for the reader.
The s3index
script can also be run separately as a CLI script, saving the index file to the local disk.
LOG_LEVEL
- Same as above, INFO or DEBUGS3_BUCKET
- The bucket to scan for files to indexS3_OUTPUT_KEY
- The S3 key to save the index into. Note the index will be saved to the bucket specified inS3_BUCKET
.SITE_NAME
- Used as the title in the included template.
As set up, the lambda function will save the index to the same bucket as it reads from - so it is a Bad Idea to trigger this lambda based on files being added or changed in the bucket.