Reputation: 165
I am creating an AWS ApiGateway & it invoking a lambda function asynchronously. Once apigateway sent the message lambda it'll send a 200 response with empty response. I need to send some static information with in the response message.
{
"code":"SUCCESS",
"description":"Successfully sent to lambda"
}
I tried to set up a model. But there I'm unable to set static values. Please help on this ?
Upvotes: 3
Views: 3277
Reputation: 19758
You need to configure AWS API Gateway Integration Response Data Mapping return the response message from your Lambda function. If you use Lambda proxy, you can directly send the entire response including headers.
Note: If its only a static response, you don't need Lambda, you can use a Mock Endpoint with static message response.
Upvotes: 2