Overview
Serverless functions provide a powerful way to process sync data in real-time without managing infrastructure. Instead of sending sync records to an HTTP endpoint, you can deploy serverless functions that automatically scale to handle your data processing needs.Serverless functions sync destinations are currently in beta. Features and
interfaces may be subject to change.
How It Works
When you configure a serverless function as your sync destination, Strata automatically:- Deploys your function - We handle the deployment and scaling of your serverless function
- Routes sync records - Each sync record is automatically sent to your function for processing
- Manages retries - Failed function executions are automatically retried with exponential backoff
- Provides monitoring - Built-in observability for function performance and error tracking
Supported Runtimes
We currently support Node.js v22.xGetting started
- If you haven’t already, install the Strata GitHub App in your GitHub repository.
- Write your serverless function using the following function signature. The function should be named
handler
. It should accept a single event parameter and return a response with astatusCode
and amessage
. You do not need to provide a specific name for the file or locate it in a specific directory.
- Commit and push your function to your GitHub repository.
- Go into the Strata dashboard and select the file as the destination for your Sync.
- A build will be triggered automatically and your function will be deployed to Strata’s serverless platform.
Keep your functions lightweight and focused on a single responsibility for
better performance and debugging.
TypeScript support
We recommend using TypeScript for your serverless functions. You can use the following type definitions in your function:Error Handling
We recommend returning descriptive error messages and HTTP status codes to help with debugging. You can view execution response logs in the Strata dashboard.Retry Behavior
The following results in a retry:- Returning a 429 or 5xx status code
- Throwing an error
Ideally, your functions should be idempotent. Records may be processed
multiple times due to retries and “at least once” event delivery.