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
50
votes
4 answers

What is a "stage" in the context of Amazon API Gateway?

What is a "stage" in the context of Amazon API Gateway? What is it's purpose and how to create one? Is there any relation to "staging" in the production/staging/development convention?
american-ninja-warrior
  • 7,397
  • 11
  • 46
  • 80
49
votes
3 answers

Setting http response header from AWS lambda

My API Gateway/Lambda setup returns an HTTP response header: Lambda uses callback function to return the value as part of a JSON and the Integration Response maps it into a HTTP header (using integration.response.body) With this solution, the values…
Saar
  • 1,753
  • 6
  • 20
  • 32
49
votes
6 answers

API Gateway - POST multipart/form-data

It seems my question maybe a little similar to this one. I have an API within my API Gateway and am doing a HTTP proxy through to an endpoint that POST's multipart/form-data files. If I call the HTTP endpoint directly (not through the API gateway) -…
Hexie
  • 3,955
  • 6
  • 32
  • 55
49
votes
4 answers

How to CNAME to Amazon API Gateway Endpoint

I'm trying to set a CNAME on Cloudflare to point to an Amazon API Gateway endpoint. The CNAME is for use when referring to one of my subdomains. The gateway in turn points to the IP of a server on DigitalOcean. I am very new to Amazon web services…
48
votes
12 answers

Execution failed due to configuration error: Invalid permissions on Lambda function

I am building a serverless application using AWS Lambda and API Gateway via Visual Studio. I am working in C#, and using the serverless application model (SAM) in order to deploy my API. I build the code in Visual Studio, then deploy via publish to…
JamesMatson
  • 2,522
  • 2
  • 37
  • 86
47
votes
4 answers

How to point ApiGateway to a specific Lambda alias

I created a resource in Amazon's ApiGateway. It is pointing to a Lambda function. This is being hit by a native mobile application (android and ios) which is already in the wild. I now want to modify the Lambda function, but I see no way to change…
digitaljoel
  • 26,265
  • 15
  • 89
  • 115
46
votes
6 answers

How do you add CloudFront in front of API Gateway

API Gateway (APIG), while it uses CloudFront (CF) it does not support CDN edge caching. When I configured a CF distribution to use APIG as the custom origin, I get a permission denied error. How do I configure CF to fix this?
rynop
  • 50,086
  • 26
  • 101
  • 112
45
votes
3 answers

Application Load Balancers vs API Gateway

AWS comes with a service called Application Load Balancer and it could be a trigger to a lambda function. The way to call such a lambda function is by sending an HTTP/HTTPS request to ALB. Now my question is how this is any different from using the…
Mehran
  • 15,593
  • 27
  • 122
  • 221
44
votes
6 answers

Custom domain for API Gateway returning 403

I am creating an api using API Gateway and Lambda. Using the url designated in the API Gateway Stage editor everything works fine; however, when I try and move to a custom domain I am running into some issues. The first thing I tried was using a…
BBS
  • 1,351
  • 2
  • 12
  • 27
44
votes
5 answers

Is it possible to use wildcards or catch-all paths in AWS API Gateway

I am trying to redirect all traffic for one domain to another. Rather than running a server specifically for this job I was trying to use AWS API Gateway with lambda to perform the redirect. I have this working ok for the root path "/" but any…
David
  • 7,652
  • 21
  • 60
  • 98
43
votes
3 answers

AWS Lambda API gateway with Cognito - how to use IdentityId to access and update UserPool attributes?

OK I am now days into this and have made significant progress but am still completely stumped about the fundamentals. My application uses Cognito User Pools for creating and managing users - these are identified on S3 it seems by their IdentityId.…
Duke Dougal
  • 24,359
  • 31
  • 91
  • 123
43
votes
4 answers

AccessDeniedException: Unable to determine service/operation name to be authorized

Using AWS CLI aws --version aws-cli/1.11.21 Python/2.7.12 Darwin/15.3.0 botocore/1.4.78 Creating a POST method for API Gateway as explained at https://github.com/arun-gupta/serverless/tree/master/aws/microservice#post-method. This method can be…
Arun Gupta
  • 3,965
  • 5
  • 31
  • 39
43
votes
6 answers

AWS API Gateway No 'Access-Control-Allow-Origin' header is present

I'm stuck on an issue with API gateway and I've gone through all the other SO answers on this, AWS forums and have been through their docs but still no joy. I am trying to setup an API using AWS API gateway which calls a Lambda function which…
user12345
  • 675
  • 1
  • 8
  • 17
43
votes
1 answer

Can I use AWS Certificate Manager certificates for API Gateway with Custom Domain Name

Can I use a certificate from AWS Certificate Manager to use it with API Gateway and my Custom Domain Name? How do I get the certificate body, private key and chain out of the certificate from the AWS Certificate Manager?
42
votes
5 answers

Enable CORS for API Gateway in Cloudformation template

I'm creating AWS Cloudformation template for my environment and I can't find a way to enable CORS for API Gateway method. I can configure it using AWS console (here is the official doc), but how can I do it in the Cloudformation template?
dds
  • 2,335
  • 1
  • 31
  • 45