Online conference calls have opened up new possibilities with the ability to analyze the meeting conversation data automatically by generating summaries of the conversation, topics discussed, sentiments about those topics, and even live captioning. For example, the Zoom API provides developers with access to a collection of information and resources like users, meetings, recordings, and conferences from Zoom. It consists of API endpoints to read, write, or modify the Zoom resources, and also the ability to subscribe to events such as when a user account is created, the meeting is started, a webinar is ended, or a recording is stopped.

With these flexible APIs, you have the power to analyze and get more meaningful insights from your Zoom data, and with the events subscription, your application is easily kept in sync with changes related to a resource in Zoom.

AWS Lambda is an event-driven, serverless technology provided by Amazon Web Service (AWS) that allows you to run code for virtually any type of application. The management and provisioning of the server are managed by AWS, so you don’t have to worry about it. As a pay-as-you-go service, it allows you to save money by only billing you for exactly what you use. You can use AWS Lambda to process the events provided by Zoom API, and build an application on top of the API.

The Lambda will create an execution environment when an event is received and will shut it down after a short period of time if it isn’t receiving any events and is idle. This means you’ll only be paying for the infrastructure when the event is received and processed, and not during idle time.

When it comes to integrating Zoom APIs with AWS Lambda, the most common challenges revolve around how to do so in a streamlined, automated manner. In this article, you will gain a better understanding of the steps you need to take to overcome these challenges, and what to look out for when integrating with Zoom APIs.

Your Most Common AWS Lambda Challenges - Integrating with Zoom APIs

Common Use Cases for Integrating Zoom With AWS Lambda

To connect to the Zoom API, all you need is the infrastructure from where you can run the instruction to execute the API. You can use Lambda for the two different types of Zoom API: API endpoints to access resources and Zoom API webhooks. Let’s look at some of the example use cases where you could leverage AWS Lambda to help you make the most out of your integrations with Zoom.

Register Someone for a Webinar

You could have an application that would register your users to a Zoom webinar based on the input they provide. You can write a Lambda function that would connect to the Zoom API and register the user to a specified webinar. This Lambda can be triggered after the input is validated and saved in your system.

Send Out Custom Reminders Through Multiple Channels

Another use case for a Lambda would be to have a daily cron job or a CloudWatch event that checks to see if there’s a webinar scheduled for the next day, and if there is, sends a reminder to all the users who’ve registered for it. Once triggered, the Lambda can connect to Zoom using the API, fetch the registered users for the webinar, and send a reminder to them via predetermined channels.

Save Completed Recordings From the Zoom API to Your Private Storage

Webhooks are triggered as soon as a resource is changed, helping you remain in sync with the resource. You could repeatedly poll the server for this information, but that will inevitably create lag while you want to be updated about the resource—not to mention the overhead it adds to the server. So, instead of using repetitive HTTP calls to poll for resource changes in Zoom, it’s a better idea to use the Zoom API webhooks. A webhook is triggered for different objects, such as meetings, webinars, and recordings, based on actions performed on the user’s Zoom account. 

Some of the actions for `recording` events are started, paused, completed, and deleted. You can provide an API gateway URL to the webhook that would trigger an AWS Lambda. Once the Lambda receives a `recording.completed` event with the recording URL in the payload, you can download the recording and save it to S3. To download the recording, you can make a GET request to the download URL with your Zoom API access token:

[js]
fetch(`${zoomDownloadUrl}?access_token=${zoomToken}`, {
method: ‘GET’
})
.then(response => {
const s3 = new AWS.S3();
const request = s3.putObject({
Bucket: ““,
Key: ““,
Body: response.body,
ContentType: ‘video/mp4’,
ContentLength: size || Number(response.headers.get(‘content-length’))
});
}
[/js]

The AWS Lambda Challenges You Face When It Comes to Zoom APIs

AWS Lambda is an event-based serverless tool for building a fully scalable application. Working with external services is a good use case. Before jumping into it, though, there are some common challenges that you need to be aware of when it comes to Zoom APIs.

Cross-Origin Resource Sharing Issues

A Lambda function is a service that’s triggered by an event, which itself needs to be triggered for Lambda to execute. In the case of the Zoom API integration, you could add an API gateway on top of AWS Lambda to trigger the connection in the Zoom API, and use a frontend library such as [AWS Amplify](https://aws.amazon.com/amplify/) to trigger the API gateway. Since the API gateway would be of a different origin to your application, you would need to allow CORS access to your API gateway to make the request successful. To enable CORS for the Lambda proxy integration, you must add the following to the output headers:

[js]
exports.handler = async (event) => {
// Request to zoom API here
const response = {
statusCode: 200,
headers: {
“Access-Control-Allow-Headers” : “Content-Type”,
“Access-Control-Allow-Origin”: “https://www.example.com”,
“Access-Control-Allow-Methods”: “GET”
},
body: JSON.stringify(‘Zoom integration Lambda response!’),
};
return response;
};
[/js]

Take a look at this guide on how to enable CORS for a REST API resource from AWS for more details.

Complex Debugging Experience

It can be complex to debug and test Lambda functions. To simplify the testing, AWS Lambda can be run locally and tested. You have a few options to test and run Lambda locally:

AWS SAM: This provides a mechanism to run the Lambda function locally. To enable this, you need to provision the AWS Lambda function using the AWS Serverless Application Model. It provides a Lambda-like execution environment to catch issues upfront.

LocalStack: An open-source alternative to AWS SAM that allows you to execute the Lambda locally. It also emulates a number of AWS services locally, which helps to debug integration with other AWS services, as well. The downside is that LocalStack is an emulator of AWS services, and isn’t owned by AWS. This means that the local service might lag behind the latest AWS service, which could result in inconsistent or absent AWS services.

Docker Lambda: This is a recent addition to container images for Lambda. You can now run a Lambda function locally based on a Docker image. You can use the AWS Lambda Runtime Interface Emulator (RIE) for Lambda functions that are packaged as container images. RIE is a lightweight web server that converts HTTP requests into JSON events for the Lambda. This allows you to trigger a Lambda locally using a simple HTTP request: <code>curl -XPOST “http://localhost:9000/2015-03-31/functions/function/invocations” -d ‘{}'</code>.

Testing the Lambda function locally can help you debug some of the issues you may run into, but running Lambda locally won’t help with debugging a production issue. This makes it important to have proper monitoring tools set up. While any external logging and monitoring service could be used, AWS CloudWatch is the easiest to set up due to its existing integration with the AWS ecosystem and is a good option, especially when you’re getting started. 

In addition to Cloudwatch, you could add a distributed tracing tool like X-Ray when you’re working with multiple AWS services. This helps to trace the request and understand any underlying service issues.

Handling Complex Data Analysis

Lambda is very flexible but has its limitations as well. For example:

– Maximum execution time of 15 minutes
– The memory ranges from 128 to 3008 MB
– Empirical disk space is limited to 512 MB

Because of these limitations, you can’t have very long-running processes or tasks that require greater disk space or memory. If you want to work with the video processing from Lambda, you may hit a disk size limit issue when downloading the meeting recordings. To resolve this, you can split down the tasks between multiple Lambdas, enabling you to spread a long-running job across multiple Lambda functions. AWS also provides [Step Functions](https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html), which you can use to orchestrate the executions.

The Steps You Must Take When Integrating With Zoom APIs

Here are some of the things that you need to integrate Zoom with AWS Lambda:

– Create an AWS account if you don’t have one.
– Build a deployment pipeline for AWS Lambda.
– Create an API gateway that connects with AWS Lambda.
– Generate Zoom API credentials with caching and key rotation.
– Add a webhook to subscribe to an event from Zoom API.
– Create an AWS Lambda that integrates with Zoom.
– Integrate a monitoring/logging tool to help debug any issues.

Dialing into the Zoom Meeting: An Alternate Approach

Symbl.ai helps you to connect with Zoom and get real-time insights from a Zoom call. The Telephony API allows you to connect to any conference call system using PSTN or SIP networks. You can follow this quick guide to get a live transcription and real-time AI insights in no time. Symbl.ai provides insights, such as follow-ups, action items, topics, and questions brought up in a Zoom call.

With Symbl.ai, there’s no need to worry about setting up the Zoom API, provisioning and monitoring Lambda infrastructure, or worrying about the application logic. To get a live sentiments or summarization, simply set up the Symbl.ai SDK following the guide above, and you’ll get a quick summary of the meeting in your email. 

Zoom test meeting

Conclusion

In this article, you learned about how to integrate AWS Lambda with Zoom Recordings API, the common pitfalls and best practices.Managing CORS, adding monitoring, and handling the shortcomings of Lambda can be challenging when it comes to the analysis of Zoom API resources.

Symbl.ai is a conversation intelligence platform for developers to build and extend applications capable of understanding natural human conversations. It allows you to convert meetings to transcripts, sentiments, summaries from Zoom—with options to integrate using recordings, live streams or dialing into meetings or calls using PSTN.

READ MORE: Your Most Common AWS Lambda Challenges: Integrating with Microsoft Teams APIs

Avatar photo
Milap Neupane
Sr. Software engineer

Milap is a Sr. Software engineer working with ruby/rails, Golang, and cloud-native technologies with AWS. He believes in the community and is the organizer of Golang Kathmandu. In his free time, Milap likes doing street photography.