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.

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.

With a few clicks in the AWS Management Console, you can create an API that acts as a “front door” for applications to access data, business logic, or functionality from your back-end services, such as workloads running on Amazon Elastic Compute Cloud (Amazon EC2), code running on AWS Lambda, or any Web application.

Amazon API Gateway handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, authorization and access control, monitoring, and API version management. Amazon API Gateway has no minimum fees or startup costs, and you pay only for the API calls you receive and the amount of data transferred out.

Amazon API Gateway product page

What is Amazon API Gateway?

7665 questions
15
votes
5 answers

AWS API Gateway: Status Code 413, Request Entity too large

I have a server less API with AWS API Gateway and Lambda function. I am using custom authorization function for authorization. The header is too large and due to which I am getting this error. Normally, for an nginx server, I would have changed the…
Mandeep Singh
  • 7,674
  • 19
  • 62
  • 104
14
votes
1 answer

How to integrate API Gateway with internal ALB

According to https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-private.html it is possible to integrate API Gateway with an internal Application Load Balancer using a private VPC link. However I cannot make…
14
votes
1 answer

What is "application/x-amz-json" and how is it different from "application/json"?

I've run into "application/x-amz-json-1.1" in making requests to AWS resources. Most recently, it became a problem that an API Gateway I was communicating with didn't like handling it (for whatever reason). This got me wondering what the benefit to…
Matthew Woo
  • 1,288
  • 15
  • 28
14
votes
4 answers

Fix CORS "Response to preflight..." header not present with AWS API gateway and amplify

I've been struggling so long with the error below. I've tried so many tutorials and stackoverflow answers and none of the solutions fixes my problem. Access to XMLHttpRequest at 'https://xxx' from origin 'http://localhost:3000' has been…
14
votes
2 answers

AWS - Route from public API Gateway to in-VPC lambda

Question From the API Gateway in the public facing AWS network to the Lambda function in a VPC subnet, where the traffice goes through? Introducing Amazon API Gateway Private Endpoints With this launch, you could build API-based services that did…
mon
  • 18,789
  • 22
  • 112
  • 205
14
votes
2 answers

Why would I get a Forbidden message from AWS API Gateway, even though things are working internally?

I have AWS API gateway setup for a public endpoint with no auth. It connects to a websocket that triggers a Lambda. I was creating connections with Python's websocket-client lib at https://pypi.org/project/websocket_client/. I noticed that…
Dave Stein
  • 8,653
  • 13
  • 56
  • 104
14
votes
1 answer

AWS API Gateway Web Socket Api - broadcast message to all connected clients

I've created a Web Socket Api using API Gateway and I'm able to connect clients to it. Also, I'm able to send messages to a connected client by specifying its ConnectionId and using the following code: const AWS = require('aws-sdk'); let…
GCSDC
  • 3,138
  • 3
  • 28
  • 48
14
votes
5 answers

Event Object is empty in AWS Lambda nodejs function

I am using Lambda function to query a RDS MySQL database. To fetch a row, I am passing the primary key as parameter in the URL (with AWS API Gateway). Example URL is: https://aaaaaaa.execute-api.aaaaaaa.amazonaws.com/default/getresult?pk=1245 In the…
arjun
  • 1,645
  • 1
  • 19
  • 19
14
votes
3 answers

AWS API Gateway integration with Socket.io

I want to map an API Gateway endpoint with a Socket.io server endpoint, in order to authenticate users through Cognito and, if successful, redirect to the Socket.io server and establish a socket with optional namespace and rooms. Is that makes…
14
votes
4 answers

enabling CORS for AWS API gateway with the AWS CDK

I'm trying to build an application with the AWS CDK and if I were to build an application by hand using the AWS Console, I normally would enable CORS in API gateway. Even though I can export the swagger out of API Gateway and have found numerous…
Ivan Kluzak
  • 655
  • 2
  • 7
  • 11
14
votes
1 answer

How to open anonymous access to AWS API Gateway resource

I have a number of lambda functions exposed via the AWS Gateway Service as such: - /some-resource GET POST OPTIONS - /some-other-resource GET POST OPTIONS - /some-public-resource GET OPTIONS The resources are secured…
ralfe
  • 1,412
  • 2
  • 15
  • 25
14
votes
2 answers

SerializationException:Start of structure or map found where not expected: API Gateway to Step function

I am using the standard blog tutorial on integrating api gateway with step functions from here: https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-api-gateway.html My step function expects the following output: { "my_params": { …
Omkar
  • 2,274
  • 6
  • 21
  • 34
14
votes
2 answers

how to add aws signature in android and call aws api gateway

I have written this code but I'm getting an error. How can I get to work? But the same token works with postman. Error: {"message":"The security token included in the request is invalid."} Code : public class test extends AppCompatActivity { …
jason
  • 3,932
  • 11
  • 52
  • 123
14
votes
1 answer

Access GET parameter in AWS Lambda

I'm new to AWS and I've just successfully setup a Lambda function with RDS connection. Now I'd like to access my new function from outside through the API gateway and passing a few arguments like: "color" : "red"…
user3191334
  • 1,148
  • 3
  • 15
  • 33
14
votes
1 answer

Method PUT is not allowed by Access-Control-Allow-Methods in preflight response, from AWS API Gateway

I've got API Gateway setup to point to a lambda function, setup as a aws_proxy. I can GET, POST, DELETE just fine, but I'm trying to add a PUT and I getting Method PUT is not allowed by Access-Control-Allow-Methods in preflight…
Justin808
  • 20,859
  • 46
  • 160
  • 265