AWS Resources - Websockets

Nitric Websockets are deployed to AWS using Amazon API Gateway.

AWS Resources

The following resources are created when deploying Websockets to AWS:

  • API Gateway v2 Websocket APIs
  • API Gateway v2 Stages
  • API Gateway Integration
  • Lambda Functions
  • ECR Images
  • IAM Policies

Deployment

During deployment the Nitric CLI builds your Websockets API's routes, methods and handlers:

  • Files referenced by the services key in the nitric.yaml file are built into container images
  • Built container images are pushed to the Amazon Elastic Container Registry as private images
  • Functions in AWS Lambda are created to run the container images
  • Default, Connect, and Disconnect routes/handlers are added to the Websocket API with their corresponding Lambda ARNs
  • The API definition is deployed as an API Gateway v2 Websocket API, using the $default stage name
  • IAM policies are created enabling API Gateway to execute the Lambdas
Last updated on Dec 13, 2024