Questions tagged [aws-http-api]

71 questions
9
votes
2 answers

Typescript for AWS HTTP API Gateway Lambda Handlers

Currently I use the following to type the lambda functions for RestApi: import { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda'; export const handler = async (event: APIGatewayProxyEvent): Promise => {} This…
Sammy
  • 3,395
  • 7
  • 49
  • 95
8
votes
2 answers

AWS API Gateway path based routing to private integrations

I am using AWS HTTP API Gateway to route requests to my integrations in the VPC. I've added a custom domain and I want to route my requests to my integrations based on the paths in the following manner Basically all the requests coming to the API…
5
votes
2 answers

Is it possible to make an AWS HTTP API gateway private?

Using AWS Direct Connect, we've built a network between our on-premise and our AWS VPC. We've developed a web application that users will access from within the on-prem network. We're using the HTTP API Gateway, which uses a VPC Link to connect to…
5
votes
1 answer

AWS HTTP API Integration with AWS Step Functions -> Send 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.…
5
votes
3 answers

HTTPApi + Serverless Framework + API Gateway CORS not working

I have an HTTPApi API Gateway created with the Serverless Framework. But for some routes, the CORS is not working. provider: name: aws runtime: nodejs12.x stage: dev region: us-west-2 timeout: 29 httpApi: cors: allowedOrigins: …
4
votes
0 answers

Difference between AWS::Serverless::Api and AWS::Serverless::HttpApi

I'm having a hard time understanding the difference between AWS::Serverless::Api and AWS::Serverless::HttpApi. I was looking at this AWS repo for Api and HttpApi and wasn't able to understand why I'd use one over the other. I see there are different…
Petesta
  • 1,623
  • 3
  • 19
  • 29
4
votes
0 answers

Get custom response from lambda authorizer of API Gateway (HTTP API)

I am trying to get a custom response from lambda authorizer for API gateway (HTTP API). Apart from checking cognito token we have added custom validations and expect to add the reason for the failure in the response. We have added error response in…
sujays
  • 151
  • 12
4
votes
1 answer

Get URL that invoked the AWS HTTP API using Lambda - Node.js

I want to build some routes for my todos, example: List Get etc So in order to do this I thought to check for the URL invoking the API (please if there is a better way call me out). I'm trying it out in a simple lambda first but can't get the URL,…
4
votes
2 answers

AWS API Gateway - Parameter mapping path with HTTP API (overwrite:path)

I started looking into using AWS HTTP API as a single point of entry to some micro services running with ECS. One micro service has the following route internally on the server: /sessions/{session_id}/topics I define exactly the same route in my…
4
votes
1 answer

The provided route key is not formatted properly for HTTP protocol

An error occurred: HttpApiRoutePostv1Banks - The provided route key is not formatted properly for HTTP protocol. Format should be "[HTTP METHOD] /[RESOURCE PATH]" or "$default" (Service: AmazonApiGatewayV2; Status Code: 400; Error Code:…
Stevan Tosic
  • 6,561
  • 10
  • 55
  • 110
3
votes
1 answer

AWS HTTP API Gateway jwt validation

I have a question regarding the way Http API gateways validate jwt signatures. I use a cognito user pool hosted in eu-west-1 as an identity provider/ token issuer. And I have an Http API gateway deployed in eu-west-1 and in us-east-1. Im using SAM…
2
votes
0 answers

AWS API Gateway V2 Integration with SQS - CloudFormation

I am trying to create a CloudFormation template to deploy an API Gateway HTTP API integrated with SQS. I used the below CF template: AWSTemplateFormatVersion: "2010-09-09" Resources: ExecutionRole: Type: AWS::IAM::Role Properties: …
2
votes
0 answers

Cdk to add Http headers in lambda integration request

I have to add few http headers mapped to the context values comes from the lambda authorizer as shown below "context": { "company_id": "xxxxx-xxx-xxxxxx", "Owner":"xxxxx", } and the headers will be sent to the minimal api. Can anyone help…
2
votes
1 answer

AWS SAM - Simple example of HttpApi with Lambda Function Integration

I am new to AWS SAM, and I am trying to modify the Hello World example template to use an open api swagger file to define an API with lambda function integrations. When I run "sam build" and "sam deploy --guided" everything goes through. However,…
2
votes
1 answer

Is there REST API key equivalent in HTTP API Gateway?

Using REST API (AWS API Gateway v1) we can use X-API-Key header in request and maintain API Key to control access to given endpoint. In AWS if I go to API Gateway and select REST API (v1) then under Resources I see: API Key Required and under API…
iaforek
  • 2,860
  • 5
  • 40
  • 56
1
2 3 4 5