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

Redirect http:// requests to https:// on AWS API Gateway (using Custom Domains)

I'm using AWS API Gateway with a custom domain. When I try to access https://www.mydomain.com it works perfectly, but when i try http://www.mydomain.com it can't connect. Is there a way to redirect the http -> https with the custom domain in API…
supersan
  • 5,671
  • 3
  • 45
  • 64
41
votes
5 answers

Unable to create a stage in AWS API Gateway

I want to create a new stage in AWS Api Gateway, but for some reason deployment list is empty. I tried checking all the sections, but could not find a section where I can add/create a deployment item. Any ideas how to resolve this?
mko
  • 6,638
  • 12
  • 67
  • 118
41
votes
1 answer

AWS API Gateway: limit requests from a single IP

Does AWS API Gateway allows limiting a number of requests from a single IP? I'm building a public API and would like to prevent it from being abused by establishing a limit on a number of times the API can be called from a single IP address (like…
spoonboy
  • 2,570
  • 5
  • 32
  • 56
40
votes
4 answers

Fail to enable CORS for API Gateway functions

I get While attempting to enable CORS on API Gateway, why is that and how do I resolve this? These functions are deployed using AWS SAM. But I notice if I create my own APIs via AWS Console this happens too The errors looks like: invalid model…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
39
votes
5 answers

Get detailed error messages from AWS API Gateway Request Validator

Background I have an API Gateway created using Swagger 2.0 definitions with API Gateway extensions. I overrode the default API Gateway responses, for instance: x-amazon-apigateway-gateway-responses: BAD_REQUEST_BODY: statusCode: 400 …
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
39
votes
9 answers

AWS API Gateway : Execution failed due to configuration error: No match for output mapping and no default output mapping configured

In AWS API Gateway, I have a GET method that invokes a lambda function. When I test the method in the API Gateway dashboard, the lambda function executes successfully but API Gateway is not mapping the context.success() call to a 200 result despite…
Zigglzworth
  • 6,645
  • 9
  • 68
  • 107
38
votes
4 answers

Data Sharing between micro services

Current Architecture: Problem: We have a two-step flow between frontend and backend layers. First step: The frontend validates an input I1 from the user on microservice 1 (MS1) Second step: The frontend submits I1 and more information to the…
38
votes
5 answers

In AWS Lambda, where can I securely store API Credentials?

I have a lambda function configured through the API Gateway that is supposed to hit an external API via Node (ex: Twilio). I don't want to store the credentials for the functions right in the lambda function though. Is there a better place to set…
Toli
  • 5,547
  • 8
  • 36
  • 56
37
votes
7 answers

How to throw custom error message from API Gateway custom authorizer

Here in the blue print says, API gateway will respond with 401: Unauthorized. I wrote the same raise Exception('Unauthorized') in my lambda and was able to test it from Lambda Console. But in POSTMAN, I'm receiving status 500 with body: { …
Tenzin Chemi
  • 5,101
  • 2
  • 27
  • 33
36
votes
4 answers

AWS API Gateway - using Access Token with Cognito User Pool authorizer?

I am configuring an app with various frontends (mobile and web apps) and a single API backend, powered by Lambda and accessed via AWS API Gateway. As I'm planning to use Cognito to authenticate and authorize users, I have set up a Cognito User Pool…
Harry
  • 4,660
  • 7
  • 37
  • 65
36
votes
7 answers

AWS Can not deserialize instance of java.lang.String out of START_OBJECT

I have made a Lambda Function and I want to access it via URL with a help of the API Gateway. I have set it all up, I have also created an application/json body mapping template in API Gateway looking like this: { "input":…
Ondrej Tokar
  • 4,898
  • 8
  • 53
  • 103
36
votes
6 answers

How to rename an AWS API Gateway API instance?

In AWS API Gateway, is it possible to rename an API instance somehow? I don't see the option on the UI, but maybe it's possible by using some API call.
Tomas Romero
  • 8,418
  • 11
  • 50
  • 72
35
votes
8 answers

Amazon API Gateway in front of ELB and ECS Cluster

I'm trying to put an Amazon API Gateway in front of an Application Load Balancer, which balances traffic to my ECS Cluster, where all my microservices are deployed. The motivation to use the API Gateway is to use a custom authorizer through a lambda…
34
votes
3 answers

How to generate access token for an AWS Cognito user?

I' using Cognito user pool for securing my API gateway . Now I would like to make requests to my API using postman but I need to pass in Authorization token as the API is secured. Is there any AWS CLI command or REST API to generate auth tokens(by…
geekprogrammer
  • 1,108
  • 1
  • 13
  • 39
34
votes
10 answers

AWS Api Gateway Authorizer + Cognito User Pool Not Working {"message": "Unauthorized"}

I am trying to use aws api gateway authorizer with cognito user pool. It is working fine when i test using aws api gateway console. But when i try enabling the authorization in the api it says "message": "Unauthorized". Please check below…