Invoke AWS Lambda and return response to API Gateway asyncronously

前端 未结 4 1557
醉梦人生
醉梦人生 2021-01-06 12:02

My use case is such that I\'ll have an AWS Lambda front ended with API Gateway.

My requirement is that once the Lambda is invoked it should return a 200 OK response

4条回答
  •  情书的邮戳
    2021-01-06 12:41

    Yes, simply create two Lambda functions. The first Lambda function will be called by the API Gateway and will simply invoke the second Lambda function and then immediately return successfully so that the API Gateway can respond with an HTTP 200 to the client. The second Lambda function will then take as long as long as it needs to complete.

提交回复
热议问题