Skip to content
Example using .Net Core 2 Web Socket with AWS Lambda
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
OnConnect
OnDisconnect
SendMessage
.gitignore
README.MD

README.MD

Example using .Net Core 2 Web Socket with AWS Lambda

This implement based from

Must have

  • Amazon.Lambda.APIGatewayEvents Version 1.2.0 (This only version to support API Gateway Web Socket)
  • MySQL for store Connection ID

Setup

  1. Create Environment Variables
  • key: TEST_LAMBDA_DBCONNECTION
  • value: server={HOST};userid={USERNAME};password={PASSWORD};database={DATABASE_NAME};convert zero datetime=True; CharSet=utf8;
  1. Push to AWS Lambda

  2. test on Web Socket Test Tools such as https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en

  3. connect and send data such as

{"action":"sendmessage","data":"hello"}

Acknowledge

  • I don't know how to test on localhost
You can’t perform that action at this time.