Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

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 Visit the GitHub repo for this sample application.

Clone this repo

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

  • Language: English
  • Runtime: Python
  • Level: 200
  • Framework: AWS SAM
  • Type: Examples
  • Additional resources


    Presented by Giedrius Praspaliauskas

    Giedrius is a Senior Solutions Architect focusing on serverless at AWS.

    Follow on LinkedIn