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.
7,752
questions
1
vote
0
answers
12
views
AWS CDK keeps deploying the the Apigateway latest changes even though the deployment logical resource id does not change
I am building a serverless API using AWS CDK, API gateway and lambda. Now I am testing out managing deployments for different stages of my API. Building what I am trying to is that I am trying to ...
0
votes
0
answers
10
views
How do I expose some endpoints of the API Gateway to Beanstalk and others to the internet?
I have an API Gateway with several endpoints currently exposed on the web. However, I want some of these endpoints to be accessible only by Beanstalk. At the same time, Beanstalk needs to expose some ...
0
votes
1
answer
27
views
Why isn't my custom authorizer Lambda function working?
I have the simplest lambda authorizer for an HTTP API Gateway that should, in theory, allow anyone to access the protected resource. However, it doesn't seem to authorize anyone. In fact, I can't even ...
0
votes
0
answers
10
views
Authenticate user / group created with AWS Identity Center (not IAM)
We have created a user with AWS identity center (not IAM). What we want is to authenticate this created user to excecute or trigger an API. In simpler words only those users which has been created ...
0
votes
0
answers
15
views
Getting 403 MissingAuthenticationTokenException with OPTIONS Requests in AWS API Gateway
I am building a web app using React, Django and AWS. I have a Rest API on API Gateway that is giving a 403 "MissingAuthenticationTokenException" that seems to be specifically on OPTIONS ...
-1
votes
0
answers
20
views
How to create an AWS API that returns the a variable?
I created an AWS Lambda function and combined it with API Gateway so that it returns "Hello World!" whenever you enter the endpoint in your browser.
Now I want to take things a step further, ...
0
votes
0
answers
13
views
AWS API Gateway Mapping Template for form submissions dies with empty form values
I have an API Gateway, with the following mapping template:
application/x-www-form-urlencoded
#set($form=$input.path("$").split("&")) Action=SendMessage&MessageBody={#...
0
votes
1
answer
20
views
How can I add request header parameters in HTTP integration WebSocket api gateway AWS
I'm new to AWS. I want to add header parameters to my HTTP request. I tried the below command in CloudShell but it was not working.
aws apigatewayv2 update-integration --integration-id xxx --api-id ...
0
votes
0
answers
36
views
CORS issue with AWS SAM deployed Lambda function
I am facing a CORS (Cross-Origin Resource Sharing) issue with a Lambda function deployed using AWS SAM (Serverless Application Model). I have implemented CORS headers in the Lambda function to handle ...
0
votes
0
answers
27
views
how/where to write custom lambda authorization code in aws?
I am following an example here (https://github.com/aws-samples/serverless-patterns/blob/main/apigw-lambda-authorizer/template.yaml ) to create an REST based API .I want to create a custom lambda ...
-1
votes
0
answers
42
views
Headers not being passed through to lambda
I want to pass a custom header via my API call.
This is my api gateway:
self.rest_api = _apigateway.RestApi(
self,
"MyApiGateway",
default_cors_preflight_options=_apigateway....
1
vote
1
answer
21
views
Is it possible to not send http integration request when checking structure of a JSON stringified query parameter?
I have an endpoint in a AWS API Gateway project, where there is a mandatory query parameter filter.
This parameter is supposed to be a stringified JSON object. And it should contain a "where"...
-1
votes
1
answer
29
views
Cetificates for a gateway [closed]
Let's say I have 5 distinct APIs, which will all be deployed to AWS API Gateway.
I have a root domain on Route 53, let's call it example-domain.com. My 'dilemma' now is whether I should create a ...
-1
votes
1
answer
38
views
how to authenticate based on a bearer token?
newbie question, I am working on an aws based REST API . I want to add authentication, one of them is client passes a bearer token. how can i read this in my application in authentication?
I have set ...
0
votes
0
answers
8
views
Sending multiple Set-Cookie headers with AWS Lambda and AWS API Gateway not working
I'm trying to send multiple Set-Cookie headers via a AWS Lambda Function integrated with an HTTP API from API Gateway but I cant manage to do that in a non-trash way.
https://docs.aws.amazon.com/...
1
vote
2
answers
34
views
AWS Api Gateway create resource with 2 path params
I am trying to create an api url with 2 params in Api gateway with lambda. I already tried with mapping query params and that is working fine but I want to add params in url. With one params its ...
1
vote
0
answers
31
views
serverless spring boot3, springdoc, Invalid or unexpected token on swagger ui
I have the following dependencies:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>...
0
votes
0
answers
37
views
How to configure a Delete Route in API Gateway
I cannot figure out how to define a route in API Gateway for a delete method using terraform.
Here is my terraform code, the POST route works just fine.
When I try to apply terraform changes, I get ...
0
votes
1
answer
39
views
"errorMessage": "'httpMethod'", "errorType": "KeyError",
Trying to PATCH data into DynamoDB, GET and POST work just fine. when it comes to PATCH I'm getting this error
{
"errorMessage": "'path'",
"errorType": "...
0
votes
1
answer
24
views
How to inform TypeScript compiler of required AWS API Gateway query string params
I have an API created in AWS API Gateway that consists of a single endpoint called /callback. This endpoint was created with a schema the defines the query string params:
export const schema = {
'...
0
votes
0
answers
29
views
Amazon API Gateway sending event to Lambda with wrong structure. event.body is undefined
I have an API Gateway launching my Lambda function (not as a proxy integration). I have the following Mapping template:
{
"body": $input.json('$'),
"headers": {
#foreach($...
1
vote
0
answers
69
views
Moving a Lambda function into a VPC causes it to error with `Phase: invoke Status: error Error Type: Runtime.Unknown`
I have a .Net 6 Lambda function that has a Hello World style endpoint that is running perfectly well. It is triggered by API Gateway in proxy mode. It currently is not deployed in a VPC. However, I ...
0
votes
0
answers
17
views
AWS managment console does not allow to modify headers or implement CORS
I've successfully implemented a set of API gateway methods and Lambda integrations. However, when attempting to add a new resource and method since few weeks, I encountered an issue. Despite selecting ...
0
votes
0
answers
17
views
I am getting error while invoking url from my api gateway to postman API.How can that be resolved? [closed]
I invoked the url from stages to postman API but i am getting as
message:null
As i am integrating postgresql with lambda I should be able to view the json contents and i am unable to view the ...
-1
votes
2
answers
37
views
aws lambda error when trying to access query parameters [closed]
I'm new to aws lambda, I created a function writen in python, i have aws api gateway as a trigger to my function.
the runtime is python 3.11
Now! here's the problem that i can't even explain:
import ...
0
votes
0
answers
24
views
how to attach an API gateway endpoint to an API gateway created in a different cdk stack
I have a main stack (shared resources) and several worker stacks. My main stack contains an api gateway resource, I pass this into the worker stacks that will attach a new endpoint to this resource ...
-1
votes
0
answers
12
views
Pattern is not working when using AWS Api Gateway with openapi v3 definition
My Api Gateway is defined using openapi v3.
In one schema I have a field which contains date time. This date time is in a specific format so I can't use format: date-time for validation because this ...
0
votes
0
answers
65
views
Mangum adapter unable to infer handler to use for event on AWS API Gateway
I have deployed an API to AWS Lambda, code written with FastAPI framework and Mangum. The URL given by AWS Lambda worked well. However, when I deploy the Lambda on API Gateway, it showed the following ...
0
votes
0
answers
21
views
How to create datastore for REST webservice using OAuth 2.0 in SAP BODS
I am trying to create a datastore in SAP BODS using authorization schema as OAuth 2.0. for webservice type REST.
I have client ID, client secret, endpoint URL, what are the field's will be required as ...
0
votes
0
answers
26
views
Problem with API-Gateway GET method and Lambda function
I am using swift UI for a stories app in which a user once logged in via the Cognito can read a story on the app screen. The user can also like the story for which I am using Dynamodb table, API ...
0
votes
0
answers
41
views
is it possible to use both x-api-key and bearer authorization token in api gateway?
I have an api gateway (REST based) resource set up , with api key enable/required for my api. with api key set up , i include x-api-key in the header and it works. in the same service , can i enable/...
0
votes
1
answer
17
views
Terraform script api_gateway with lambda integration
I have created the following terraform script -
provider "aws" {
region = "eu-west-2"
}
resource "aws_lambda_function" "my_lambda_function" {
...
-1
votes
1
answer
35
views
How to connecting AZURE SCIM to AWS API Gateway
I'm currently working on configuring AWS API Gateway with a Lambda authorizer for implementing rate limiting on requests to an Azure SCIM endpoint. My intended flow is illustrated in the diagram ...
0
votes
1
answer
23
views
Stripe-Signature header missing with AWS API Gateway + Lambda
I have an AWS API Gateway connected to a Lambda that listens for Stripe webhooks on checkout.
Here is another screen:
When I checkout with test credentials, I get 400 Bad Request "Webhook Error:...
1
vote
0
answers
55
views
Use Stripe webhooks and AWS API Gateway + Lambda to update flag in DynamoDB table
I have a website with a submission form that writes to a DynamoDB table and sets a default "Paid" flag to false.
This is a snippet from the frontend to give you a sense of the field names:
...
1
vote
0
answers
56
views
AWS Go lambda recevie raw http request bytes without any base64 encoding through API gateway
I am trying to build a rest api with Go using lambda and api gateway. In the api, I want to process the raw request body bytes without any base64 conversion in middle.
I am able to receive base64 ...
0
votes
1
answer
34
views
Running C++ program on API call in AWS
I have a C++ algorithm that I want to execute every time an API call is made to API Gateway, this algo takes a bit to run, something between 1min and 30mins, and I need to run one instance of this ...
0
votes
0
answers
10
views
How to make AWS Cognito Guest Access granted via OTP?
I'm building a mobile application that has its backend accessed via API Gateway, and secured with Cognito User pools.
The app has a quite long onboarding process, and for business reasons it has to be ...
-1
votes
1
answer
19
views
How can I modify a DynamoDB query using an API Gateway mapping template?
I am using an APIGW to proxy Dynamo requests.
The aim is to intercept queries and add on some fixed filtering expressions.
I am using a mapping template to do this but getting stuck with the template ...
0
votes
0
answers
8
views
Not able to enable the cors of APIgateway via CFT. But we are able to do it manually using the console
Not able to enable the cors of APIgateway via CFT. But we are able to do it manually using the console.
I also use the code in the correct answer in the below to questions:
Enable CORS for API ...
0
votes
0
answers
25
views
Does it make sense to write integration/end-to-end tests for api-gateway?
just want to know/see different point of views regarding this type of tests for api-gateway and your experience if you had something similar in your practice.
Thank you.
1
vote
1
answer
60
views
Check FastApi headers within AWS Lambda before routes
I am trying to deploy an API with FastAPI, hosted on AWS Lambda and accessible through AWS API Gateway. Every request will have to include a valid JWT in the headers before being processed. I would ...
0
votes
0
answers
25
views
API Gateway calling index page from S3 but unable to load js file
I am testing a solution to use Cognito to authorise using Azure AD and then landing at API gateway URL. This API Gateway will load an S3 bucket index page. This index.html then uses one of js file ...
-1
votes
1
answer
25
views
Where does AWS CLI export files?
I am trying to export an OpenAPI specification from AWS API Gateway using AWS CLI. The request looks like this:
aws apigateway get-export --parameters extensions='apigateway'
--rest-api-id x8yfzmmuqh ...
-3
votes
0
answers
28
views
How can I view the source of failed AWS ec2 API calls?
I keep receiving an error RequestLimitExceeded when calling aws ec2 describe-instances within my AWS environment.
Within CloudWatch Metrics I can see several hundred calls to the ec2 API per second ...
0
votes
0
answers
26
views
AWS Api Gateway custom domain name certificate blocked in pending state (Terraform)
I try to create an AWS api gateway with a custom domain name and SSL certificate.
I already bought a registered domain root.com and have an hosted zone app.root.com for my cloudfront frontend. I want ...
1
vote
1
answer
17
views
How to resolve same FDQN to two different AWS services
Is it possible to have "www.example.com" resolve to an API Gateway and "www.example.com/assests" resolve to CloudFront?
3
votes
1
answer
46
views
In an aws proxy integration js lambda, is there a correct or standard way to get html form values from event.body, rather than just using querystring?
Have a trivial aws lambda (.mjs file). Have a trivial API gateway, using proxy integration. Have a trivial web form,
<form method="post" action="...">
<input type="...
-1
votes
0
answers
20
views
payload - null parameter
I´m creating a api gateway at AWS.
I must need to have a parameter as null at my payload, but i´m receiving an error (Unsupported keyword(s): ["nullable"]) when try to use a nullable tag or ...
0
votes
0
answers
23
views
How can I verify regular WAF expression syntax and test it for AWS API Gateway?
I have configured a AWS API gateway (GET and POST ) method for pet store project(POC) and have to configure few WAF rules to my below sample JSON structure.
[
{
"id": 1,
"type&...