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
16
votes
1 answer

Aggregation of data on API Gateway

I am working on microservice architecture and I want to aggregate data from two microservices. For example, Frontend calls the API Gateway and API Gateway calls two microservices Customer and Order microservices. Customer microservice returns…
16
votes
2 answers

Why is the method response of an API gateway different when being created using terraform?

I have the following terraform script which creates an API gateway that passes requests to a lambda function. provider "aws" { access_key = "${var.access_key}" secret_key = "${var.secret_key}" # region = "${var.region}" version =…
Brian
  • 12,145
  • 20
  • 90
  • 153
16
votes
8 answers

AWS API Gateway Websockets -- where is the connectionID?

I am setting up an AWS API Gateway Websockets with a custom authorizer on the $connect route, as described here: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-route-keys-connect-disconnect.html My question is…
16
votes
3 answers

What is the best way to restrict access to an Application Load Balancer?

Ideally, I'd like to lock down my ALB so that it can only be accessed by API Gateway. I've looked into whether I can associate API gateway with an Inbound Rule - however, I have found that API Gateway cannot be associated with an IP address, or a…
fuzzi
  • 1,967
  • 9
  • 46
  • 90
16
votes
1 answer

AWS API Gateway with Lambda proxy always produces base64 string response

I'm using API Gateway Lambda proxy integration and trying to return a binary application/protobuf response. No matter what I do, the response body is always a base64 encoded string I have application/protobuf setup as a binary media types in…
rynop
  • 50,086
  • 26
  • 101
  • 112
16
votes
4 answers

AWS API Gateway Custom Authorizer not invoked

To start off with, i am pretty new to AWS. Started with pretty basic API Gateway + Lambda integration. Below are my use cases. Created a Lambda proxy Integration request with API Gateway, GET request which outputs the addition of 2 numbers passed…
Amit
  • 465
  • 2
  • 6
  • 20
16
votes
2 answers

Getting an error trying to create an AWS API Gateway via Cloudformation

I'm trying to make a simple Cloudformation to create a website hosted on S3 with an API Gateway backend. Everything seems OK as far as I can tell but I get errors when trying to create the API Gateway: Errors found during import: Unable to put…
Justin808
  • 20,859
  • 46
  • 160
  • 265
16
votes
2 answers

AWS Lambda and S3 static file routing with custom domain

I have been trying to setup a simple Serverless App on AWS but am failing to understand how to put the pieces together with a custom domain. The web app routes should looks something like this: / -> Serves static HTML / CSS / JS from S3…
16
votes
2 answers

api gateway regional custom domain is not working

I'm testing to make mobile game server with AWS's Lambda and API gateway. At the API gateway, I try to make custom domain using 2 types endpoint, regional a.domain.com and edge optimized b.domain.com. The edge optimized endpoint is fine, it works.…
Uisang Song
  • 161
  • 1
  • 3
16
votes
2 answers

Exactly which path do I cURL for LocalStack API Gateway Lambda integration?

LocalStack is neat, but it's hard to find documentation for it. I'm having trouble hitting my API Gateway proxy endpoint that's connected to a Lambda function. The only things I can think of is when I did the put-integration for the gateway, I…
Aaron
  • 2,154
  • 5
  • 29
  • 42
16
votes
3 answers

Amazon API Gateway authorization AWS_IAM

What does it means AWS_IAM as Authorization model in Amazon API Gateway? If I test the Lambda inside the AWS console it works and prints "Hello World", but if I use the endpoint URL and open it inside another browser's tab it say…
BAD_SEED
  • 4,840
  • 11
  • 53
  • 110
16
votes
2 answers

AWS API Gateway usage by API key

How do I get the usage metric from AWS API Gateway by API key, e.g. usage counter, usage logs, etc.? I am currently sending the x-api-key to my integration endpoint for manual logging. I would prefer not to do this and let AWS API Gateway measure…
Tri Q Tran
  • 5,500
  • 2
  • 37
  • 58
16
votes
9 answers

API Gateway Mock Integration Fails with 500

I have an API Gateway integration for a method/resource which works when I call it from the API but not when I actually call it: $ aws apigateway test-invoke-method --rest-api-id $REST_API_ID \ --resource-id $RESOURCE_ID --http-method GET | jq…
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
16
votes
2 answers

aws lambda execution after callback guaranteed?

My node4 lambda function called via API GW makes a sequence of slow API calls. In order to not let users wait until everything completes, I'm planning to have my code look like this: function(event, context, callback) { ... // Return users API…
bebbi
  • 2,489
  • 3
  • 22
  • 36
16
votes
2 answers

AWS API Gateway: Execution failed due to configuration error: Invalid JSON in response

I have an API gateway setup with a Custom Authorizer that calls a Lambda function. For testing purposes I copied the example from here:…
Alex Lungu
  • 1,104
  • 2
  • 12
  • 28