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
22
votes
5 answers

Getting error: Missing Authentication Token after AWS API request

I am trying to call a Lambda Function through AWS API Gateway. I've been getting this error when I tried IAM authentication, API Key Authentication and also with no authentication. {"message":"Missing Authentication Token"} Some people had the…
22
votes
9 answers

AWS API Gateway endpoint gives CORS error when POST from static site on S3

I have created an API endpoint with Serverless(serverless.com) which I expose through API Gateway. I'm getting following error though I have enabled CORS from the XMLHttpRequest cannot load …
Milindu Sanoj Kumarage
  • 2,714
  • 2
  • 31
  • 54
21
votes
2 answers

AWS API Gateway: why post request body is encoded base64?

Am using API gateway to trigger a Lambda function, using Lambda Proxy integration, however the request body is encoded base64, why is that? and how can I change it to be JSON to stringify JSON?
user3462064
  • 455
  • 2
  • 6
  • 24
21
votes
2 answers

Error creating API Gateway Integration Response: NotFoundException: Invalid Integration identifier specified

Objective Solution or workaround for the problem. Problem The Terraform API Gateway integration with Firehose below works if Firehose is created separately in advance. resource "aws_api_gateway_integration" "click_put" { rest_api_id =…
21
votes
3 answers

API Gateway custom domain certificate error

I'm trying to set up a regional API gateway with a custom domain, and I'm hitting a problem involving SSL certificates. Here's what I've done: Using ACM, created a certificate for vitalservices-3.docriot.com. In API Gateway, created a regional…
21
votes
1 answer

Random status code: 502 errors on AWS api gateway connected to lambda

I have multiple lambdas exposed with api gateway using proxy integration. From time to time i'm getting strange errors with status code 502. There is nothing in lambda cloud watch logs. Below i posted api gateway logs for sample…
Pawel
  • 887
  • 1
  • 9
  • 28
21
votes
1 answer

How do I create an API Proxy using Terraform and AWS API Gateway

I am trying to use Terraform to be able to stand up a simple API Proxy in API Gateway on AWS. Basically, I want to wrap root and proxy the requests back to another end point. Its probably the simplest setup and I can't seem to get it to work in…
knaak
  • 1,293
  • 1
  • 12
  • 18
21
votes
3 answers

AWS API Gateway base64Decode produces garbled binary?

I'm trying to return a 1px gif from an AWS API Gateway method. Since binary data is now supported, I return an image/gif using the following 'Integration Response'…
rjmurt
  • 1,135
  • 2
  • 9
  • 25
20
votes
1 answer

How to deploy to different environments with AWS SAM

I have two questions about AWS SAM and deployments. I’m reading through the docs and checking through examples like this and I’m still not quite sure how to deploy to a staging and production environment separately with my SAM template. Is it as…
Petesta
  • 1,623
  • 3
  • 19
  • 29
20
votes
2 answers

aws apigateway import-rest-api returns "Invalid base64" error

I am trying to export and than import AWS Gateway API, following the instructions in https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-migrate-accounts-regions/. Export is working: aws apigateway get-export --parameters…
Dmitriy Popov
  • 2,150
  • 3
  • 25
  • 34
20
votes
5 answers

AWS API Gateway - CORS "access-control-allow-origin" - multiple entries

I have a AWS Lambda instance that connects to a defined AWS API Gateway. If I enable CORS and give the access-control-allow-origin a definition of http://example.com, then I am able to access the Lambda instance from http://example.com. However,…
Wes
  • 724
  • 1
  • 11
  • 29
20
votes
6 answers

How to return gzipped content with AWS API Gateway

We have developed an application that offers serveral rest services and supports Accept-Encoding header to return compressed content through Content-Encoding:gzip header value. This application is deployed on ec2 instances on aws and when we send a…
althor
  • 739
  • 2
  • 9
  • 21
20
votes
3 answers

AWS API Gateway: Pass through all parameters

I am using API Gateway in Amazon as a simple proxy to a backend api. The main reasons for using it are: a simple way to get API keys and authentication, tracking, and handling "environments". My problem is that, we just want to pass through all…
alph486
  • 1,209
  • 2
  • 13
  • 26
20
votes
3 answers

Return HTML from AWS API Gateway

I am trying to achieve the same thing as this post, but I do not understand the reply there and don't have permission to ask for clarification in the comments. I have an API Gateway endpoint that accepts a GET request, passes through some request…
Kenneth D.
  • 845
  • 3
  • 10
  • 18
20
votes
5 answers

How to pass array query params to AWS API Gateway?

A Rails API typically likes array query params like this: example.com?colors[]=cyan&colors[]=magenta&colors[]=yellow&colors[]=black How would I map that through to a lambda function?
kjs3
  • 5,758
  • 8
  • 34
  • 49