Skip to content

Unable to invoke a function that has hooked up to the --only-lambda-apis watcher #815

@bassmanitram

Description

@bassmanitram

Previously I could do this

  • cargo lambda watch --only-lambda-apis
  • export the env vars that that command says I should
  • run my lambda executable
  • cargo lambda invoke <payload details etc>

I would get the expected response

Now I have made is that the project is now a workspace with two binaries. I follow that sequence now and the cargo lambda invoke command returns immediately with the following error:

Error: Default function disabled

  × the default function route is disabled. To trigger a function call, add the name of a function as the invoke argument. Available functions: {"backend-url-plugin", "api-proxy-lambda"}

  Was this error unexpected?
  Open an issue in https://github.com/cargo-lambda/cargo-lambda/issues

When my lambda function hooks up to the watcher, the watcher displays the following:

Image

which appears to indicate that it has successfully hooked up as function "_". Setting AWS_LAMBDA_FUNCTION_NAME to any other value for the lambda function itself does not change the name with which it registers to the watcher.

As I said, this appears to be because I have a workspace with two binaries now - BUT since the watcher is only emulating the Lambda service and is not involved in the lifecycle of the lambda code itself then I'd still expect it to work as before.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions