Skip to content

sst dev should validate handler paths during deployment, not only at invocation #6680

@anatolzak

Description

@anatolzak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions