简体   繁体   中英

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

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:

在此处输入图片说明

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.

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 (eg LambdaTest::LambdaTest.LambdaHandler::handleRequest ). Even if you change it tho, you would need to stick to the signature described in the docs .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM