You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to invoke a function that has hooked up to the --only-lambda-apis watcher #815
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:
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.
I'm working on a fix - should be pretty straight forward - the determination of whether the default function is active should include an assessment of whether only-lambda-apis is true.
Activity
bassmanitram commentedon Mar 11, 2025
I'm working on a fix - should be pretty straight forward - the determination of whether the default function is active should include an assessment of whether only-lambda-apis is true.
Fix issue described in #815 (#816)
calavera commentedon Mar 15, 2025
I just released version 1.8.0 with the fix for this issue. Thanks again for reporting it and fixing it!
github-actions commentedon Mar 15, 2025
This issue has been automatically locked. Create a new discussion if you'd like to continue the conversation. https://github.com/cargo-lambda/cargo-lambda/discussions/new?category=general