What is the format for Lambda Function in Amazon Web Services Websocket Gateway API route setup?

246 views Asked by At

I am attempting to follow this tutorial for setting up a WebSocket API using Amazon API Gatewway:

https://medium.com/@gavinlewis/getting-started-with-websockets-on-api-gateway-with-net-and-the-serverless-framework-9065f37d06e0

Like in the tutorial, my Lambda application is written in C# with classes for Connect, Disconnect, etc.

Unlike the tutorial, I am using the AWS website to set up the Gateway API. This is where I am stuck. I can't figure out how to "map" the $connect, $disconnect, echo, etc using the website UI:

enter image description here

I am not sure what the format of the value for the "Lambda Function" textbox. It is probably similar to this (from tutorial) but, I get a validation error when I use this value:

CsharpHandlers::App.Disconnect::FunctionHandler

So, what is the proper value I should enter to reference my lambda application, a specific class and a specific method?

Thanks.

1

There are 1 answers

0
Kostadin Mandulov On

In the Lambda Function form field you need to put the ARN of the function you want to proxy the request to.

To modify a Lambda function's default handler, open it in the AWS Management Console, and look for the Handler field under the Function code section (e.g. LambdaTest::LambdaTest.LambdaHandler::handleRequest). Even if you change it tho, you would need to stick to the signature described in the docs.