Problem
When running sst dev, if you provide an invalid handler path (e.g. a file that doesn't exist), no error is shown during deployment. The error only surfaces when you actually invoke the function.
In contrast, sst deploy catches invalid handlers immediately during the build step.
new sst.aws.Function("MyFunction", {
handler: "does/not/exist.handler", // no error in sst dev until invoked
});
Expected behavior
sst dev should validate that the handler path points to a valid file during deployment, the same way sst deploy does. This way developers get immediate feedback without needing to invoke the function first.
Why this matters
Discovering an invalid handler only at invocation time is too late. A developer might deploy, assume everything is working, and only find out about the typo or missing file during the production deployment in the CI/CD.