Simple lambda function which uploads any Dyte recordings to vimeo using API.
Change VIMEO_API_KEY
in serverless.yml
with your VIMEO API key. Refer to this guide to get an API key.
$ serverless deploy
After deploying, you should see output similar to:
Deploying upload-to-vimeo-lambda to stage dev (us-east-1)
✔ Service deployed to stack upload-to-vimeo-lambda-dev (94s)
dashboard: https://app.serverless.com/xxxxxx/apps/upload-to-vimeo/upload-to-vimeo-lambda/dev/us-east-1
endpoint: POST - https://xxxxxxxx.execute-api.us-east-1.amazonaws.com/
Note: In current form, after deployment, your API is public and can be invoked by anyone. For production deployments, you might want to configure an authorizer. For details on how to do that, refer to http event docs.
After successful deployment, you can call the created application via HTTP:
curl https://xxxxxxxx.execute-api.us-east-1.amazonaws.com/
Which should result in response similar to the following
{
"statusCode": 200,
"body": "{\n \"message\": \"Upload to vimeo done\"\n}"
}
You can invoke your function locally by using the following command:
serverless invoke local -f upload -p test.json
Which should result in response similar to the following:
{
"statusCode": 200,
"body": "{\n \"message\": \"Upload to vimeo done\"\n}"
}