fastify / fastify/aws-lambda-fastify

AWS Lambda plans to remove support for callback-based function handlers

Offen
#268 4 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
559
Forks
37
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Motivation

Ref: https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/137

Callback handler syntax is being deprecated for the new Node 24 Lambda runtime and should be replaced with the async syntax.

I didn't see any open issues or PRs related to this, apologies if this is duplicative or if there is already an option to change this behavior under the hood. Otherwise, if nobody else is working on this I can give it a shot.

### Example

```ts
exports.handler = (event, context, callback) => {
// ... handler logic
callback(null, { statusCode: 200, body: 'Success!' });
};
```
**to:**
```ts
export const handler = async (event, context) => {
// ... handler logic
return { statusCode: 200, body: 'Success!' };
};
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.