AWS Lambda
Invoke an AWS Lambda function with row data as JSON payloads for serverless processing. Use Zeotap to trigger custom data transformations, enrichments, or routing logic in Lambda functions as part of your sync pipeline.
Prerequisites
- An AWS account with an active Lambda function
- An IAM user or role with
lambda:InvokeFunctionandlambda:GetFunctionpermissions on the target function - AWS access key ID and secret access key for authentication
Authentication
AWS Lambda uses AWS Access Keys authentication.
- In the AWS IAM Console, create an access key for a user with Lambda invoke permissions
- Enter the Access Key ID and Secret Access Key in Zeotap
Required IAM Permissions
The IAM user needs the following permissions on the target Lambda function:
{
"Effect": "Allow",
"Action": [
"lambda:InvokeFunction",
"lambda:GetFunction"
],
"Resource": "arn:aws:lambda:us-east-1:123456789012:function:my-function"
}Replace the ARN with your function’s actual ARN. Use * for the function name to grant access to all functions in the account (not recommended for production).
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| AWS Region | Select | Yes | The AWS region where the Lambda function is deployed. Default: us-east-1. Options include US East (N. Virginia, Ohio), US West (N. California, Oregon), EU (Ireland, London, Frankfurt), Asia Pacific (Tokyo, Singapore, Sydney), Canada (Central), and South America (Sao Paulo) |
Target Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Function Name | Text | Yes | The Lambda function name, ARN, or partial ARN to invoke (e.g., my-data-processor) |
| Invocation Mode | Select | No | Synchronous (default) waits for the function response and reports per-row errors. Asynchronous fires and forgets with higher throughput |
Supported Operations
Sync Modes
| Mode | Supported |
|---|---|
| Insert | Yes |
| Upsert | — |
| Update | — |
| Mirror | — |
Audience Sync Modes
| Mode | Supported |
|---|---|
| Add | Yes |
| Remove | Yes |
| Mirror | Yes |
| Upsert | Yes |
Zeotap forwards the sync intent to your Lambda function via the sync_mode field on the payload and the per-row operation field (add, remove, or upsert). Your function decides how to apply each operation in the downstream system.
Features
- Field Mapping: No — Lambda receives all mapped fields in the payload
- Schema Introspection: No — Lambda functions accept arbitrary JSON input
How It Works
Zeotap invokes your Lambda function with batches of row data serialized as JSON:
- Rows are grouped into batches of up to 500 rows per invocation
- Each invocation sends a JSON payload containing the sync mode, row data, operation type, and primary keys
- For synchronous invocations, Zeotap parses the function response to extract per-row error reporting
- For asynchronous invocations, success is counted once AWS accepts the event (HTTP 202)
Payload Format
Each Lambda invocation receives a JSON payload with the following structure:
{
"sync_mode": "insert",
"rows": [
{
"data": {
"email": "user@example.com",
"name": "Jane Doe",
"plan": "enterprise"
},
"operation": "insert",
"primary_key": "user@example.com"
}
]
}Response Format (Synchronous Only)
To enable per-row error reporting, your Lambda function should return a JSON response with this structure:
{
"statusCode": 200,
"errorCount": 1,
"errors": [
{
"primary_key": "user@example.com",
"error": "Invalid email domain"
}
]
}If the response cannot be parsed or does not include an errors array, all rows are counted as succeeded (provided the function did not return a function-level error).
Payload Size Limits
| Invocation Mode | Maximum Payload |
|---|---|
| Synchronous (RequestResponse) | 6 MB |
| Asynchronous (Event) | 1 MB |
Zeotap batches rows at 500 per invocation to stay well within the synchronous limit. For asynchronous mode with large rows, consider reducing the number of mapped fields to keep payloads under 1 MB.
Rate Limits
AWS Lambda has a default concurrency limit of 1,000 concurrent executions per region. If your function is at its concurrency limit, new invocations are throttled with a TooManyRequestsException (HTTP 429). Zeotap retries throttled invocations automatically with exponential backoff.
To avoid throttling:
- Set reserved concurrency on your function to guarantee capacity
- Use asynchronous invocation mode for high-volume syncs (AWS manages the retry queue)
- Monitor the
ThrottlesCloudWatch metric for your function
Best Practices
- Use synchronous mode when you need per-row error reporting and delivery confirmation
- Use asynchronous mode for high-throughput event-style syncs where occasional retry delays are acceptable
- Keep function timeout short (under 60 seconds) to avoid blocking the sync pipeline
- Return structured errors from your function to get detailed error reporting in Zeotap
- Set reserved concurrency to prevent Zeotap invocations from being throttled by other callers
Troubleshooting
Access denied (403)
Verify the IAM user has lambda:InvokeFunction permission on the target function ARN. Check that the function’s resource-based policy does not explicitly deny access from the IAM user’s account.
Function not found (404)
Ensure the function name, ARN, or partial ARN is correct and the selected AWS region matches the function’s actual region. Function names are case-sensitive.
Payload too large (413)
The batch payload exceeds Lambda’s size limit. This is unlikely with the default batch size of 500 rows but can occur with very wide rows. Reduce the number of mapped fields or contact support to adjust the batch size.
Function timeout
Your Lambda function is taking longer than its configured timeout. Increase the function timeout in the AWS Console or optimize the function code. Zeotap waits for the full function execution time in synchronous mode.
Throttling (429)
The function has hit its concurrency limit. Increase the function’s reserved concurrency in the AWS Console, or switch to asynchronous invocation mode which uses AWS’s built-in retry queue.
Function errors
If the function returns an error (unhandled exception), all rows in the batch are marked as failed. Check the function’s CloudWatch Logs for the stack trace and fix the error in your function code.