API Gateway WebSocket integrations

Amazon API Gateway WebSocket integrations.

Modern applications use the WebSocket protocol for bidirectional communications. With Amazon API Gateway WebSocket APIs you can build bidirectional communication applications without having to provision and manage servers.
Many WebSocket samples use AWS Lambda or HTTP(s) as the integration targets for connect/disconnect routes. This sample implementation uses the AWS service integration type to show how to simplify serverless architectures.
Sometimes developers need to use a URL in their WebSocket based applications. This requirement may be driven by REST API design best practices for resource naming, or by an industry standard requirement such as Open Charge Point Protocal (OCPP) for electric vehicle infrastructure. However, API Gateway WebSocket endpoints do not support URL paths besides stage name.
This solution shows how to implement URL path support for WebSocket APIs in Amazon API Gateway using Amazon CloudFront and CloudFront Functions.

< Back to all repos

GitHub icon View this repo on GitHub


Clone this repo

git clone https://github.com/aws-samples/serverless-samplescd apigw-ws-integrations

Additional resources


Created by:

Giedrius Praspaliauskas

Giedrius Praspaliauskas

Giedrius is a senior solutions architect focusing on serverless at Amazon Web Services based in the US.

Follow on LinkedIn