-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke graphql lambda from another lambda #784
Comments
@epiphaneSpecter You are trying to do lambda Synchronous invocation, therefore u need add another function handler for that
however, it is more easy to just use the graphql client and invoke the same |
ok okay, but i would have to pay twice. i.e. both the lambda execution resources and the call through API Gateway. |
@hardyscc by declaring a new handler this time, the starting of nestjs will be done in a classic way as is nestjs done by default? |
@epiphaneSpecter Yes u need to bootstrap the nestjs server (i.e. src/index.ts) and invoke the function yourself. |
@epiphaneSpecter normally if just simple operation i won't bootup nestjs at all, and just instance a dynamodb model then do the update |
excuse me I'm a little lost, suppose I have two projects A and B. I'm currently in B and want to invoke A. I have to define a new hanlder in the A which will process my request (which does not come from API Gateway). So my question is: the logic that should be in my new handler should be how, just an idea. |
the new handler is just a normal lamdba handler like that export const handler = async (event, context) => { ... } |
ok, tks |
I have two lambda (separate project) developed in nestjs + grapqh. I am trying to call one of the lambda through the other and get responses with the invoke function of aws sdk.
Did the problem come from my way of writing the payload? because I have tried several formats but still no result.
because I noticed that the request is well received by the second lambda, but it may not be able to resolve it.
Tks in advance for your feedback
//serverless.yml for the called function
The text was updated successfully, but these errors were encountered: