On some projects, we need the client to be able to communicate with the server in real-time. The Websocket protocol works over the TCP socket connection and provides the ability of real-time, bi-directional communication between client and server.

The article gives a simple guide to set up the WebSockets API service on AWS, by using the serverless framework, API Gateway, and DynamoDB.

Prerequisites

There is some basic knowledge and information you need before we get going.

AWS account

Create your own AWS account by following the link if you don’t have one yet.

Configuring the AWS CLI

The AWS Command Line Interface (AWS CLI) is an open-source tool to interact with AWS services using commands in your command-line shell.

We use the aws-cli npm package in this tutorial:

$ npm install aws-cli -g

#software-development #programming #serverless #aws #nodejs

Node.js and Websockets on AWS
2.80 GEEK