2
votes

I am working on a project to build a backend serverless web api. After reading those documents on AWS api gateway/lambda developer guide, I am totally confused by different methods that I can use.

I am very new to all the web stuff including request, response, proxy, ...

I've tried some solutions I found both on tutorials and online but still confused.

  1. On API Gateway Integration Request, under Integration Type, there are "Lambda function" and "AWS service" , if I choose AWS service, then I can still choose lambda. What is the difference? If I choose lambda, I can choose "use lambda proxy integration", I researched "proxy" and I think I got the idea, but I still feel very confused here. In my experiment, I can get the request inside the "event" object only if I choose "use lambda proxy integration". Sometimes the web browser can render the response coming from the lambda, and sometimes it requires some set up inside the API gateway

  2. What is the best solution/practice to use in my case?

Please help

3

3 Answers

3
votes

AWS Service is for calling the AWS API for that service. Lambda function is for calling a Lambda function. If you want to call the Lambda function, and not call some AWS API related to administering your Lambda functions, then choose integration type "Lambda function".

You second question is so broad I don't even know what you are asking.

2
votes

Try Claudia.js It maybe the only tool you need. Try also BST Proxy. It has a nifty proxy for local debugging.

2
votes

I would like to let you know the serverless key points.

  • AWS API Gateway works as a proxy and It can be access directly to third party clients.

  • AWS Lambda function works like an EC2 in a private subnet.

Since AWS Lambda cannot be access directly by third party clients, so you need an AWS API Gateway as a proxy to AWS Lambda function.