@lambda-middleware/do-not-wait
v1.0.1
Published
AWS lambda middleware to prevent Lambda from timing out because of processes running after returning a value.
Downloads
64
Readme
@lambda-middleware/do-not-wait
AWS lambda middleware to prevent Lambda from timing out because of processes running after returning a value.
Lambda middleware
This middleware is part of the lambda middleware series. It can be used independently.
Usage
import { doNotWait } from "@lambda-middleware/do-not-wait";
// This is your AWS handler
async function helloWorld() {
return {
statusCode: 200,
body: "",
};
}
// Wrap the handler with the middleware
export const handler = doNotWait()(helloWorld);