{"repo":"aws-samples/simple-websockets-chat-app","free":true,"listed":false,"github":"https://github.com/aws-samples/simple-websockets-chat-app","clone":"git clone https://github.com/aws-samples/simple-websockets-chat-app.git","description":"This SAM application provides the Lambda functions, DynamoDB table, and roles to allow you to build a simple chat application based on API Gateway's new WebSocket-based API feature.","language":"JavaScript","stars":704,"topics":["websockets","apigateway","aws"],"license":"MIT-0","category":"chat-messaging","readme_excerpt":"simple-websockets-chat-app Update : We have released an updated and more feature-rich Websocket chat application sample using AWS CDK that you can find here. This is the code and template for the simple-websocket-chat-app . There are three functions contained within the directories and a SAM template that wires them up to a DynamoDB table and provides the minimal set of permissions needed to run the app: Deploying to your account You have two choices for how you can deploy this code. Serverless Application Repository The first and fastest way is to use AWS's Serverless Application Repository to directly deploy the components of this app into your account without needing to use any additional tools. You'll be able to review everything before it deploys to make sure you understand what will happen. Click through to see the application details. AWS CLI commands If you prefer, you can install the AWS SAM CLI and use it to package, deploy, and describe your application. These are the commands you'll need to use: Note: .gitignore contains the samconfig.toml , hence make sure backup this file, or modify your .gitignore locally. Testing the chat API To test the WebSocket API, you can use wscat, an open-source command line tool. 1. Install NPM. 2. Install wscat: 3. On the console, connect to your published API endpoint by executing the following command: 4. To test the sendMessage function, send a JSON message like the following example. The Lambda function sends it back using the cal","default_branch":null,"files":null,"tree":[],"storefront":"/r/aws-samples","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/aws-samples/simple-websockets-chat-app/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}