Handling EventBridge batch failures in Node.js Lambda

Is it possible to configure the AWS SDK v3 to return partial batch responses when processing high-volume Genesys Cloud interaction events? I am currently hitting Lambda concurrency limits because my handler processes the entire batch synchronously. If a single record fails validation, the whole batch retries, causing exponential backoff and queue depth spikes.

Here is my current handler logic:

export const handler = async (event) => {
 for (const record of event.Records) {
 await processGCInteraction(record);
 }
 return {};
};

How do I modify this to return failed record IDs in the response object for dead-letter processing?

To fix this easily, this is…

I usually handle batch failures by parsing the event body and processing records individually in a loop. This prevents one bad Genesys Cloud payload from blocking the entire Lambda execution.

$events = $TriggerEvent.Records | ForEach-Object { $_.Body | ConvertFrom-Json }
foreach ($evt in $events) { Process-GCEvent $evt }

This looks like a misconfiguration of the Lambda batch window settings. Adjust the MaximumRetryAttempts in your AWS SDK config to isolate failures, as detailed in KB-9921: Partial Batch Handling for EventBridge.

As far as I remember, the core issue is not just Lambda concurrency, but ensuring the integrity of the data stream when processing large sets of Genesys Cloud events in an orchestration layer. The suggestion above about processing records individually is valid, but it misses a common orchestration pitfall. You must implement strict defensive coding to handle null payloads gracefully and prevent runtime crashes in your Java integration layer.

  1. Configure ReportBatchItemFailures in your Lambda response object to allow partial success.
  2. Wrap each Genesys Cloud API call in a try-catch block to isolate validation errors.
  3. Return the itemIdentifier for failed records so EventBridge can retry them individually.

Here is the correct Node.js structure for the response payload:

return {
 batchItemFailures: [
 { itemIdentifier: "failedRecordId" }
 ]
};

This approach prevents exponential backoff by ensuring only invalid records are retried, keeping your queue depth stable during high-volume Genesys Cloud interaction streams.

This looks like a scope mismatch. The admin:api-token scope is insufficient for long-lived token generation via the API. You need admin:api-token:manage on the service account. Verify the OAuth client configuration in the admin portal. See https://support.genesys.com/kb/9921 for details.