7,788 questions
0
votes
0
answers
25
views
Unable to transform request AWS Gateway VTL
I have the following pulumi go code which uses AWS Integration to start a StepFunction.
func DealRequestTemplate(stateMachineArn pulumi.StringInput) pulumi.StringInput {
return pulumi.Sprintf(`#...
0
votes
0
answers
53
views
AWS CDK use api gateway in a nested stack
I have this api gateway in my main stack:
api_gateway = _api_gw.LambdaRestApi(
self,
f"{construct_id}-gw-api",
handler=lambda_hello,
rest_api_name=f"gw-api{env_ext}"...
0
votes
1
answer
85
views
Spring Boot OAuth2 with Casdoor behind AWS Lambda + HTTP API v2: state parameter encoding issue
I’m developing a Spring Boot application deployed behind an AWS API Gateway (HTTP API v2) with Lambda (handler based on SpringBootLambdaContainerHandler and HttpApiV2ProxyRequest).
I’m using OAuth2 ...
0
votes
0
answers
20
views
awsEndpointRequestId not being consumed by headers for HTTP APIGateway
According the Customize HTTP API access logs, the logging variable $context.awsEndpointRequestId is populated from x-amz-request-id or x-amzn-requestId header.
I am directly hitting the my HTTP ...
1
vote
0
answers
52
views
Mongodb not available for my AWS Lambda function
I have tried to import mongodb into my lambda function and I keep getting an error message when I attempt to test it. All the recommended resolutions I have seen assume I am working in an environment ...
0
votes
0
answers
44
views
Is it possible to create an HTTP API Gateway integration to EventBridge that reads the detail-type from a detail-type attribute of the payload?
My input to API Gateway looks like this:
{
"detail": {
"stuff": "goeshere"
},
"detail-type": "ApiGatewayTest",
"source&...
1
vote
2
answers
82
views
Can I transform a query string parameter with AWS API Gateway using a Lambda proxy integration?
The AWS docs here state that "You can use parameter mapping in your integration request for proxy and non-proxy integrations, but to use parameter mapping for an integration response, you need a ...
0
votes
0
answers
58
views
CloudFront throws 401 or 403 before accessing to API Gateway
This is my first time deploying a web application using AWS and I could successfully see the static pages but not dynamic pages now.
I've read that when CloudFront gets a header with authorization, it ...
0
votes
0
answers
36
views
Error Invoking Sagemaker Endpoint from API Gateway REST API Integration
I am having difficulty invoking a sagemaker endpoint from API gateway. The API gateway API is a REST API (POST method type) with Sagemaker Runtime as the Integration type. The HTTP method in the ...
2
votes
1
answer
121
views
Why does AWS STS regional endpoint affect when calling an API Gateway in a different region?
I have a simple Python script that makes a GET request to a REST API hosted in AWS API Gateway. To authorize the request, I use the temporary credentials obtained by assuming a role (a role that is ...
0
votes
1
answer
136
views
How to set Access-Control-Allow-Origin dynamically from incoming Origin header in integration response?
I'm working on an AWS API Gateway setup. I need to dynamically set the Access-Control-Allow-Origin header in the response based on the incoming Origin header from the client request.
This is necessary ...
0
votes
1
answer
52
views
How to map custom header into body request?
I'm working with AWS Api Gateway integrated with SQS.
I would like to catch a header from the request to the Api Gateway and map it to the body, so it becomes part of the message the SQS will recieve.
...
0
votes
0
answers
77
views
AWS API Gateway WebSocket 403 Forbidden errors despite correct policy and credentials
Problem Description:
I'm encountering persistent 403 Forbidden errors when trying to use WebSocket connections with AWS API Gateway. We recently migrated from ca-central-1 to us-east-1 region, and ...
0
votes
0
answers
70
views
Enable CORS for simple GET on AWS API Gateway resource with Cognito authorizer
I have an AWS API Gateway resource /foo with a GET method. It has a Lambda integration, which for the purposes of this question simply returns bar. However I want the API to be protected, so I have ...
0
votes
0
answers
76
views
How to convert a http response with content type application/json to application/octet-stream?
What is the issue?
We use AWS API Gateway for integration with the AWS S3 using REST calls.
In the API Gateway transformation we haven't supported HTTP_HEADERS yet. And we don't want to roll out ...
0
votes
1
answer
58
views
SAM template authorizerr error: authorizerUri/Fn::Sub/1/__FunctionArn__] 'null' values are not allowed in templates
Trying to create and API Gateway with lambda and attach the authorizer to it. The api and lambda creation works perfectly, but when I add the authorizer section, I get the following error:
Error: ...
1
vote
0
answers
62
views
How to configure AWS API Gateway Integration Request for CloudWatch Logs StartQuery Action?
I'm trying to configure API Gateway to provide a POST method that sends the StartQuery action to CloudWatch Logs but I just seem to get 404 errors in the log output as when I use Edit integration ...
1
vote
1
answer
101
views
What is the difference between a "REST API" of type "private" and a "REST API Private"
When creating an API endpoint on the AWS console, 2 options exist:
Option A: A "REST API" with "API endpoint type" of "Regional" or "Edge-optimized" or "...
0
votes
1
answer
61
views
How can I ensure my AWS Lambda function uses the CloudFront domain instead of the API Gateway URL for the canonical link in my Qwik SSR application?
I have an AWS Lambda function connected to an API Gateway (Regional HTTP API) and my domain is linked to CloudFront. However, my application's canonical URL is being set to the API Gateway domain ...
0
votes
0
answers
58
views
AWS API-gateway multiple authorizer and caching
Context
I have an api-gateway with a custom authorizer that validates a JWT. The authorizer gives back broad resource permissions. Something like the following:
{
"Version": "2012-10-...
0
votes
1
answer
82
views
how to remove escape char \" that is added by aws api gateway integration response
I have this template:
#set($context.responseOverride.header.A = 'ab "cd"')
In Postman I see a header A with value "ab \"cd\"".
I want to see in Postman a header A with ...
0
votes
0
answers
38
views
AwsIntegration write to DynamoDB SerializationException
I have the following code which takes a POST input and writes the data in a DynamoDB table.
It works if I don't add the validation to check if the key:value pair exists.
Here is the code:
const ...
0
votes
0
answers
131
views
AWS API Gateway Returning {"message":"not found"}
Been working on this semi-secure (will add HTTPS later) API Gateway. I've managed to deploy the TF into the cloud, and it built fine.
My main issue currently is that when I try to use the Invoke URL (...
2
votes
2
answers
120
views
AWS SAM: Calling a Lambda Function from an API Gateway asynchronously
In my current project I want to call a long running Lambda function from an API Gateway asynchronously. All resources are defined in a SAM template.
I tried to follow the instructions in
https://docs....
0
votes
0
answers
45
views
How to invoke API developed using AWS API Gateway which was protected by Amazon Cognito user pool token in Salesforce Apex class
I have created an API using AWS API Gateway, which is protected by an Amazon Cognito User Pool.
I need to obtain a token from Amazon Cognito to invoke or access this API from my Salesforce Apex class. ...