amazon-api-gateway-developer-guide icon indicating copy to clipboard operation
amazon-api-gateway-developer-guide copied to clipboard

Set up asynchronous invocation of the backend Lambda function Guide is outdated

Open notAmine opened this issue 4 years ago • 3 comments

Hello, the steps present in the guide here are outdated since the API gateway is different now, is it possible to update this to hold the new steps to follow? Thanks;

notAmine avatar May 28 '21 15:05 notAmine

Hi,

Thanks for reaching out. Were there any specific things that you struggled with or found to be outdated?

mcdwil avatar Jun 01 '21 21:06 mcdwil

Hi, Yes I believe since the guide was published there was a change in the API gateway console UI, specifically, I don't see the tabs: Method Request & Integration Request mentioned in the steps:

Configure Lambda asynchronous invocation in the API Gateway console

For all invocations to be asynchronous:

In Integration Request, add an X-Amz-Invocation-Type header with a static value of 'Event'.

For clients to decide if invocations are asynchronous or synchronous:

In Method Request, add an InvocationType header.

In Integration Request add an X-Amz-Invocation-Type header with a mapping expression of method.request.header.InvocationType.

Clients can include the InvocationType: Event header in API requests for asynchronous invocations or InvocationType: RequestResponse for synchronous invocations.

notAmine avatar Jun 01 '21 21:06 notAmine

I also tried to follow this instructions but UI does not match. @notAmine and others: were you able to setup this asynchronous lambda invocation? Any idea on how to do it?

gulshan avatar Dec 07 '21 20:12 gulshan

Sorry for the delayed response. I'd suggest double checking that you're using a REST API and not an HTTP API. Set up asynchronous invocation of the backend Lambda function has also recently been updated to include more examples. Hope that helps!

mcdwil avatar Jan 17 '23 23:01 mcdwil

Oh good to know I'm way past that project now but thanks for the closure :)

notAmine avatar Jan 18 '23 08:01 notAmine