Questions tagged [aws-api-gateway]
Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.
6,462
questions
441votes
22answers
358kviews
How to pass a querystring or route parameter to AWS Lambda from Amazon API Gateway
for instance if we want to use
GET /user?name=bob
or
GET /user/bob
How would you pass both of these examples as a parameter to the Lambda function?
I saw something about setting a "mapped from" ...
406votes
18answers
241kviews
Can an AWS Lambda function call another
I have 2 Lambda functions - one that produces a quote and one that turns a quote into an order.
I'd like the Order lambda function to call the Quote function to regenerate the quote, rather than just ...
151votes
4answers
60kviews
API gateway vs. reverse proxy
In order to deal with the microservice architecture, it's often used alongside a Reverse Proxy (such as nginx or apache httpd) and for cross cutting concerns implementation API gateway pattern is ...
150votes
24answers
192kviews
Missing Authentication Token while accessing API Gateway?
I am trying to call a Lambda Function through AWS API Gateway.
When I mention Authentication type NONE it works fine but API become public and anyone with url can access my API.
To make API call ...
139votes
24answers
154kviews
API Gateway CORS: no 'Access-Control-Allow-Origin' header
Although CORS has been set up through API Gateway and the Access-Control-Allow-Origin header is set, I still receive the following error when attempting to call the API from AJAX within Chrome:
...
114votes
19answers
63kviews
AWS lambda api gateway error "Malformed Lambda proxy response"
I am trying to set up a hello world example with AWS lambda and serving it through api gateway. I clicked the "Create a Lambda Function", which set up the api gatway and selected the Blank Function ...
111votes
4answers
158kviews
Getting json body in aws Lambda via API gateway
I'm currently using NodeJS to build a bot on AWS lambda via AWS Api Gateway and I'm running into an issue with POST requests and JSON data. My api uses 'Use Lambda Proxy integration' and even when I ...
108votes
12answers
89kviews
Is there a way to change the http status codes returned by Amazon API Gateway?
For instance if I want to return a specific 400 error for invalid parameters or perhaps a 201 when the lambda function call resulted in a create.
I'd like to have different http status codes but it ...
105votes
27answers
121kviews
getting message: forbidden reply from AWS API gateway
I am trying to create a lambda service on AWS and have it accessed from outside via the API gateway with no authentication or restriction required.
To make things easy I set the gateway for now to be ...
92votes
1answer
27kviews
Regional/Edge-optimized API Gateway VS Regional/Edge-optimized custom domain name
This does not make sense to me at all. When you create a new API Gateway you can specify whether it should be regional or edge-optimized. But then again, when you are creating a custom domain name for ...
86votes
8answers
72kviews
Using an API key in Amazon API Gateway
I have created an API Key and added it to my functions. I have then deployed the api and tested it but still get:
"message": "Forbidden"
How do I pass the api key with my JSON ...
64votes
5answers
53kviews
How can I retrieve a user's public IP address via Amazon API Gateway + Lambda (node)
I'm currently writing a Node.js lambda function, in which I want to log the incoming requester's public IP address. I've been looking through both the API Gateway and Lambda docs all day, but haven't ...
63votes
7answers
50kviews
aws api gateway & lambda: multiple endpoint/functions vs single endpoint
I have an AWS api that proxies lamba functions. I currently use different endpoints with separate lambda functions:
api.com/getData --> getData
api.com/addData --> addData
api.com/signUp --> ...
61votes
10answers
88kviews
Amazon API gateway timeout
I have some issue with API gateway. I made a few API methods, sometimes they work longer than 10 seconds and Amazon returns 504 error. Here is screenshot below:
Please help! How can I increase ...
55votes
11answers
67kviews
How to pass a params from POST to AWS Lambda from Amazon API Gateway
In this question How to pass a querystring or route parameter to AWS Lambda from Amazon API Gateway
shows how to map query string params to AWS lambda using API gateway. I would like to do the same ...