Specify HTTP response codes in Lambda Custom Runtime

0

I built an AWS Lambda custom runtime function to be triggered through function URLs for a streaming response. I don't see how I can set the HTTP response code, such as 404 or 500. I know it's possible for most HTTP codes in the supported runtimes, like NodeJS. Is it possible with custom runtimes?

I asked this question on StackOverflow with no luck https://stackoverflow.com/questions/78443309/custom-http-response-codes-in-aws-lambda-custom-runtime-with-function-urls?noredirect=1#comment138293602_78443309

asked 15 days ago204 views
1 Answer
0

Hi,

Lambda Proxy integration will allow you to return the http code that you want: see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html

Best,

Didier

profile pictureAWS
EXPERT
answered 15 days ago
profile pictureAWS
EXPERT
Uri
reviewed 15 days ago
  • The API Gateway doesn't allow streaming responses, or does it?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions