Upgrade 6.x -> 7.x
aka "Lambda goes durable"
Version 7.x of Middy no longer supports Node.js versions 20.x. You are highly encouraged to move to Node.js 24.x.
Notable changes
- Add support for Durable Functions, caused breaking changes to
streamifyResponse. - LLRT can now be used when using
executionModeStandard(default) &executionModeDurableContext - Works with new Tenant isolation mode
- Works with new multi-concurrency on Lambda Managed Instances
Core
- Add support for Durable Functions. Will lack support for timeout abort signal at time of release.
- Deprecate
streamifyResponseoption forexecutionModeBreaking Change
import middy from '@middy/core'
const lambdaHandler = (_event, _context) => {
// ...
}
export const handler = middy({ streamifyResponse: true })
.handler(lambdaHandler)
changes to
import middy from '@middy/core'
import { executionModeStreamifyResponse } from '@middy/core/StreamifyResponse'
const lambdaHandler = (_event, _context) => {
// ...
}
export const handler = middy({ executionMode: executionModeStreamifyResponse })
.handler(lambdaHandler)