Experimenting with AWS API Gateway default response and triggering AWS Lambda

0 votes

I have been trying to use AWS API Gateway and AWS Lambda to implement a  serverless architecture. Have been going through various blogs and AWS documentation. Even  tried out sample GET/POST operations. But, I have the following requirements w.r.t tracking user events from my custom application:

  • Events are posted from my application to API end point
  • I wanted the API to respond back with a custom response(acknowledging that the request has been received)
  • After the response is sent, hand over the event payload to a AWS Lambda function

 As per the documentation, I understand, a) I can post events to API end point b) On GET/POST trigger an AWS Lambda Function - Respond back from AWS Lambda function to API request.

But what i want is 

a) Post events to API end point a.0) Respond back acknowledging that request is received [Say {'fine'} ] b) Trigger AWS Lambda function to process the event payload.

Any kind of suggestions are welcome.

 

Aug 16, 2018 in AWS by datageek
• 2,440 points
31 views

1 answer to this question.

0 votes

You can try out the following steps 

  1. Post an event to an API Gateway endpoint
  2. Trigger an AWS Lambda Function A
  3. Call asynchronously a Lambda Function B using the AWS SDK in the Lambda Function A
  4. Call context.succeed() or context.done() or the callback function in the Lambda Function Aso it respond back to API Gateway
  5. The Lambda Function B can process the data while API Gateway already received a response
answered Aug 16, 2018 by Deepthi
• 300 points

Related Questions In AWS

+1 vote
2 answers

Starting with an AWS Instance with API and AUTHPARAMS

The API is usually much easier to ...READ MORE

answered Apr 17, 2018 in AWS by Cloud gunner
• 4,260 points
336 views
0 votes
2 answers
+1 vote
3 answers

Not able to pass params POST to AWS Lambda from Amazon API Gateway

For this template : application/x-www-form-urlencoded  This line below will ...READ MORE

answered Jun 13, 2018 in AWS by Cloud gunner
• 4,260 points
1,663 views
0 votes
1 answer
0 votes
1 answer