-
-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
5.6.1
Plugin version
6.3.0
Node.js version
22
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
public.ecr.aws/lambda/nodejs:22.2025.10.29.20
Description
Just wanted to drop a note and report an issue I ran into using @fastify/aws-lambda when running in a Docker container on Lambda versus a native Node runtime. It seems that the library adds almost exactly 10 seconds to the response time. Primarily logging this in case anyone else runs into it, so feel free to close.
After some debugging, I modified the code to not use the callback function it detects (which I think isn't actually the callback, but possibly some other method - didn't spend too much time tracing that, since the build/test cycle is slow in this flow).
By simply returning the promise on https://github.com/fastify/aws-lambda-fastify/blob/main/index.js#L209 there is no delay in the response.
Somewhat related to #268 .
This is with a Dockerfile starting with:
FROM public.ecr.aws/lambda/nodejs:22.2025.10.29.20
Link to code that reproduces the bug
n/a
Expected Behavior
Response is returned immediately without an extra 10 second delay.