1 Answers
0
Accepted Answer
If you return the count in a header from the Lambda function you can just reference it using integration.response.header.header-name
.
To return a header from the Lambda function just return something like this:
{
"statusCode": 200,
"headers": {
"header1Name": "header1Value",
"header2Name": "header2Value",
},
"body": "...",
}
For more information see here. You will see that it describes that only headers from the backend can be mapped to headers in the response.
Relevant questions
Return a custom header from lambda authorizer in API-gateway (HTTP api)
asked 2 months agoLambda response compression to API Gateway and client
asked 6 months agoReturn Count from Lambda into the "Response Header" of the API
Accepted Answerasked 2 years agoLambda Authorizer Context Response Size Limit
Accepted Answerasked 6 months agoReturn HTML to browser from API Gateway using Lambda Proxy Integration
asked 4 years agoHow to shorten the API response time in a API GW + Lambda solution
asked 3 months agoCalling Private API from Lambda in VPC
Accepted Answerasked 2 years agolambda take few seconds to return response
asked 4 months agoAPI Gateway - Gateway response - HTTP API
Accepted Answerasked 2 years agoIs it possible to return 401 error from WebSocket API Gateway Lambda Authorizer without throwing an error?
asked a month ago