Closed biigpongsatorn closed 4 years ago
yes you can do this, you're just bypassing the API Gateway HTTP->JSON formatter, and it's wise to do so since API Gateway is pretty expensive.
Your payload needs to be like { path: '/..', headers: {}, method: 'GET' }
See: https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway.html
@demacdonald Thanks. It's work!
I have a Lambda function that works as a REST API server by using
serverless-http
and I want to invoke this Lambda function from another Lambda function directly via AWS SDK (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.html#invoke-property)How can I do this?
REST API Lambda function:
Let's say my API has a route
/user/profile
and I would like to call the Lambda to route/user/profile
via AWS SDK invoke.What's the payload should be?