Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 860 Bytes

README.MD

File metadata and controls

29 lines (19 loc) · 860 Bytes

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