Pattern: Verifying Lambdas

A consistent dry and verbose convention turns lambdas from opaque handlers into debuggable, production-safe programs.

Dec 16, 2025

Lambdas can be difficult to debug in remote environments. To make this easier, I always look to have them support the following params:

  • verbose — add to the output a summary of what was done, e.g. entities processed, items skipped, etc.

  • dry — simulate execution without side effects

// accepted by the lambda
type BaseLambdaOptions = {
  verbose?: boolean
  dry?: boolean
}

// output by the lambda
type VerboseResponse = {
  verboseLog?: string
}

From an admin or debug tool, allow manual invocation of all lambdas, defaulting to verbose=true, and optionally dry=true.