AWS SAM now supports WebSocket APIs for Amazon API Gateway

Published
May 5, 2026
https://aws.amazon.com/about-aws/whats-new/2026/05/aws-sam-websocket-apis-api-gateway/

AWS Serverless Application Model (AWS SAM) Updates

AWS SAM now supports WebSocket APIs for Amazon API Gateway, allowing you to define complete WebSocket APIs with minimal configuration in your SAM template. This update simplifies the process of building real-time applications such as chat, live dashboards, AI/LLM streaming, and IoT by automatically generating the required resources and permissions from your template.

New Features

  • WebSocket API Support: Define WebSocket APIs directly in your SAM template.
  • Automatic Resource Generation: SAM automatically generates required resources and permissions.
  • Globals Support: Share common configurations across multiple WebSocket APIs.

What to do

  • Add the AWS::Serverless::WebSocketApi resource type to your SAM template.
  • Define routes by specifying Lambda function handlers for $connect, $disconnect, and $default routes.
  • Configure authorization, stage settings, and custom domains within the resource definition.

Source: AWS release notes




If you need further guidance on AWS, our experts are available at AWS@westloop.io. You may also reach us by submitting the Contact Us form.

Follow our blog

Get the latest insights and advice on AWS services from our experts.

By clicking Sign Up you're confirming that you agree with our Terms and Conditions.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.