On common thing that may lead to runtime errors on function is a mismatch between the node version of the build and the function runtime. Can you make sure both are the same and set them using environment variables:
AWS_LAMBDA_JS_RUNTIME and NODE_VERSION
Try setting them as the same node version you’re running locally.
It looks like you’ve opened a separate thread that looks quite similar.
In that thread you’ve mentioned the issue might have something to do with including files in subdirectories. As Hrishikesh mentioned, we’ll need a minimal repro to help debug further. Let us know if that’s possible!