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
76
votes
20 answers

Signature expired: is now earlier than error : InvalidSignatureException

I am trying a small example with AWS API Gateway and IAM authorization. The AWS API Gateway generated the below Endpoint : https://xyz1234.execute-api.us-east-2.amazonaws.com/Users/users with POST action and no parameters. Initially I had turned…
j10
  • 2,009
  • 3
  • 27
  • 44
70
votes
3 answers

AWS API Gateway - Remove Stage Name From URI

The stage name is added to the url when I deploy the API. Let's say the stage name is "test", then the generated URL for the resource includes the stage name. Something like: https://abcabc.execute-api.us-east-1.amazonaws.com/test/my/path I would…
evansgambit
  • 825
  • 2
  • 8
  • 9
68
votes
14 answers

Unable to resolve " not a valid key=value pair (missing equal-sign) in Authorization header" when POSTing to api gateway

I created an api-gateway to put data in my s3 bucket. When I test it in console it works with no problem. Even when I test my token in the authorizer test it returns an "Allow", so there's nothing wrong with my token. My token validation is ^Bearer…
Tesuji
  • 1,335
  • 2
  • 12
  • 26
65
votes
11 answers

CloudFormation doesn't deploy to API gateway stages on update

When I run CloudFormation deploy using a template with API Gateway resources, the first time I run it, it creates and deploys to stages. The subsequent times I run it, it updates the resources but doesn't deploy to stages. Is that behaviour as…
bjfletcher
  • 11,168
  • 4
  • 52
  • 67
64
votes
7 answers

No integration defined for method - Choose a stage where your API will be deployed

I'm working with AWS API Gateway and AWS Lambda. Often I face this type of error message when attempt to deploy API. The error message says to select a deployment stage. But I still selecting and trying to deploy! but same error occur! In this API…
Hasan Abdullah
  • 2,498
  • 1
  • 19
  • 34
59
votes
1 answer

AWS API Gateway error: API Gateway does not have permission to assume the provided role as S3 proxy

There are similar questions but they have answers that I have tried. I'm not sure what I could be doing wrong but any help would appreciated. Test details: The Error from a method-execution test; PUT request: Execution log for request…
Kurt Campher
  • 745
  • 1
  • 5
  • 11
59
votes
13 answers

How to pass a params from POST to AWS Lambda from Amazon API Gateway

In this question How to pass a querystring or route parameter to AWS Lambda from Amazon API Gateway shows how to map query string params to AWS lambda using API gateway. I would like to do the same but mapping POST values instead of query-string. I…
ecorvo
  • 3,559
  • 4
  • 24
  • 35
57
votes
8 answers

AWS API Gateway: User anonymous is not authorized to execute API

Trying to post to an API I've created in API gateway: { "Message": "User: anonymous is not authorized to perform: execute-api:Invoke on resource: arn:aws:execute-api:us-west-2:***********:jrr7u1ekrr/v0/POST/user" } How can I update the policy…
tgk
  • 3,857
  • 2
  • 27
  • 42
56
votes
10 answers

401 return from an API Gateway Custom Authorizer is missing 'Access-Control-Allow-Origin' header

In order to prevent users who have not logged in to call my lambda function through the AWS API Gateway, I'm using the Custom Authorizer lambda solution. If the request is authorized (200) and I get a response from the called lambda everything works…
hanbzu
  • 880
  • 1
  • 8
  • 14
55
votes
1 answer

In Terraform, how do you specify an API Gateway endpoint with a variable in the request path?

In AWS API Gateway, I have a endpoint defined as /users/{userId}/someAction, and I'm trying to recreate this with terraform I would start having some sort of linked gateway_resource chain like so... resource "aws_api_gateway_resource" "Users" { …
iquestionshard
  • 956
  • 1
  • 7
  • 17
54
votes
9 answers

How do I find the API endpoint of a lambda function?

I have a Lambda function that has an exposed API Gateway endpoint, and I can get the URL for that via the AWS console. However, I would like to get that URL via API call. Neither the Lambda API documentation nor the API Gateway documentation seem to…
howcheng
  • 2,211
  • 2
  • 17
  • 24
54
votes
8 answers

How to access HTTP headers for request to AWS API Gateway using Lambda?

I see in the API Gateway FAQ that it is possible to access the request headers sent to the API Gateway... If you already utilize OAuth tokens or any other authorization mechanism, you can easily setup API Gateway not to require signed API calls…
JaredHatfield
  • 6,381
  • 2
  • 29
  • 32
52
votes
7 answers

AWS API Gateway custom Authorizer strange showing error

Here is the context: I set up a resource in the API gateway. /user/company This resource have 2 methods. Get and POST. I have configured a custom Authorizer for this resource. The problem: I can call the GET method by sending right authorization…
Arman Fatahi
  • 2,635
  • 3
  • 24
  • 37
52
votes
5 answers

Lambda Integration vs. Lambda Proxy: Pros and Cons

What do you think are the Pros and Cons of using Lambda integration with and without the proxy feature in AWS API Gateway (and more specifically, when using the Serverless framework)? Here's what I think up to now: Lambda Integration with…
marcelog
  • 7,062
  • 1
  • 33
  • 46
51
votes
11 answers

AWS API Gateway - CORS + POST not working

CORS is really driving me crazy and I'm really out of ideas as of what to try to make it work. I have created a simple APIG Api with 1 resource called 'abc' and added 2 methods GET and POST both with Authorization set to NONE and API Key Required…
HBR
  • 901
  • 1
  • 8
  • 15