Questions tagged [aws-http-api]

71 questions
2
votes
2 answers

AWS API Gateway HttpAPI SAM Custom Domain Name Error

I want to move my existing Rest API to HTTP API, and getting error in custom domain configuration. My SAM file for HTTP API is: resHttpApiGateway: Type: AWS::Serverless::HttpApi Properties: StageName: !Sub "${paramEnvironment}" …
2
votes
2 answers

AWS - HTTP API Gateway - How do I block favicon requests?

I'm using a HTTP API Gateway to trigger a lambda invocation. When I use the url from postman, no issues. When I use it from my browser, it always makes a 2nd request, for the favicon. Is there anyway in the gateway itself to block the favicon…
firestreak
  • 377
  • 4
  • 17
2
votes
1 answer

AWS SAM APIGatewayProxyRequestEvent HttpMethod not set when starting API locally

I created an application with a AWS::SERVERLESS::FUNCTION, which has an HttpApi Event attached to it. I thought it would be a good idea to create one lambda per resource, so e.g. Post, Get and Put on /customer are all handled by a single lambda,…
Dominic
  • 61
  • 5
2
votes
0 answers

Is it possible to add a custom Header with AWS Lambda (HTTP API)

I'm using a custom authentication with AWS Lambda on my API Gateway HTTP API. Currently, if auth pass, it will return like this: return { 'isAuthorized': True, 'context': { 'userId': user_id } } I'm aware that with REST API its…
2
votes
0 answers

could'nt find right parameter for aws_apigatewayv2_route around the "target" Terraform

while creating simple aws http api using terraform I couldn't get right approach/ precise parameter to api integration scipt(aws_apigatewayv2_integration) and api route (aws_apigatewayv2_route) As shown below [Image for creating http api routes…
1
vote
1 answer

Using Cloudfront with an HTTP API Origin

I want to redirect HTTP traffic to HTTPS. So I want to put my app, which runs on an API Gateway, behind Cloudfront. But I want to use aws_cdk.aws_cloudfront to launch my Cloudfront instance. self.distribution = cloudfront.Distribution( self, …
louisdeb
  • 360
  • 4
  • 16
1
vote
1 answer

AWS API Gateway HTTP API Not Returning application/json content-type

I am using AWS SAM to build a lambda-based API. Originally I used a "Rest API" but I have converted my Rest API over to a HTTP API but the content type returned from the API is now "text/plain" instead of "application/json". Any ideas why my API is…
1
vote
3 answers

Can anyone provide a working example of an AWS SAM template that has CORS setup in a HttpApi resource?

I have been going round and round trying to get this working. I want to be able to define the CorsConfiguration in the HttpApi resource definition but everything I try simply doesn't work. I can only get CORS working if I defined it globally, but…
fixiecoder
  • 56
  • 6
1
vote
1 answer

Best way to authorize a single HTTP API request in API Gateway in AWS?

For a reason I won't mention here, I need to give a random person with no account a secret link to my HTTP API method which calls a lambda function in AWS. The API method needs to be under authorization, but I am unsure on what is the best approach.…
1
vote
1 answer

What is the max limit of quotas on an api on aws?

I have 400 quotas and if I add one more I'm getting an error 'Maximum number of Resources for this API has been reached.' What is the maximum number? 500-800? I want to know if I can extend it for another 200-300 quotas or I need to create another…
1
vote
1 answer

Defining API path with query string Serverless HTTP API (API Gateway v2)

How can I define the path in serverless.yml with more than one query parameter using HTTP API (API Gateway v2) so that the endpoint looks like the following: https://example.com/rest/endpoint?id=$id&tag=$tag serverless.yml dfsPostback: …
Ben Jonson
  • 565
  • 7
  • 22
1
vote
0 answers

CORS is blocked in the AWS HTTP API Gateway when a custom lambda authorizer is used

I have an API powered by HTTP API Gateway and Lambda that uses a custom authorizer. I use a custom authorizer for a few paths and other paths are haven't authorized and can be accessed publicly. This setup works fine in postman, but when I use react…
1
vote
0 answers

AWS HTTP API Integration with AWS Step Functions -> Sending Multiple Values in the Input

I have a Type: AWS::Serverless::HttpApi which I am trying to connect to a Type: AWS::Serverless::StateMachine as a trigger. Meaning the HTTP API would trigger the Step Function state machine. I can get it working, by only specifying a single input.…
1
vote
0 answers

ASP.NET core web API routing not supported in AWS HTTP API Gateway?

I am trying to transfer an asp.net core web api to my first AWS HTTP API. I have hosted the asp.net core web api project as a lambda function, and trying to match the endpoints through the API gateway. I can access the default endpoints though my…
nilarya
  • 99
  • 1
  • 16
1
vote
1 answer

Sending Message attributes in API Gateway V2 does not work for $request.header

We are trying to connect API Gateway V2 with API SQS Integration. This integration is working fine and messages are arriving to the queue. The problem is when we try to add value from header header.sample1 to the message. Usually the suggested…