Why can a batch time out even when every SDK call has a timeout?
After this you can answer: Why can a batch time out even when every SDK call has a timeout?
Say it in 30 seconds
Section titled “Say it in 30 seconds”The deeper answer
Section titled “The deeper answer”The email handler checks DynamoDB, sends through SES and records completion. After the batch, it adjusts visibility for failed messages. Repeated slow calls across ten records can exceed the function budget even if each individual call eventually times out.
The email Lambda configures one-second connection and three-second request timeouts, but this does not prove a strict upper bound for every SDK operation or its retries. The ticket entry point additionally sets maxAttempts: 1 and explicit request-timeout failure behavior. Treat those configurations separately.
The email queue visibility is 60 seconds for a ten-second Lambda. AWS recommends at least six times the function timeout, including any configured batching-window allowance. If the invocation times out before returning its partial response, undeleted records can be retried, including records with completed side effects. A proposed remaining-time cutoff would need to report all unprocessed records as failures; that cutoff is not implemented here.
Counter-questions
Section titled “Counter-questions”Why not increase the timeout immediately?
Does partial failure reporting survive a hard timeout?
Would concurrent processing solve it?
Where in MiniTickets
Section titled “Where in MiniTickets”Read the path chapter, select the relevant map piece →, then inspect apps/worker/src/batch.ts → handleBatch. Work through the related case for a diagnostic example.
Read this book online: https://book.theversehub.in/