AWS AppSync Events API

awsReal-time gatewayaws-appsync-events

Serverless WebSocket pub/sub API that broadcasts events over channel namespaces to subscribed clients.

Provider
aws
Category
Edge
Properties · 5 set by this component
propertytypevaluesrequiredkind defaultthis component
ackIntervalSeconds · advancedinteger—no—inherited
authorizationMode · component propertyenumapi-key | aws-iam | amazon-cognito-user-pools | openid-connect | aws-lambdano—inherited
autoscalingboolean—nofalse▸ true
channelAssignment · advancedenumrandom | hash | stickynorandominherited
drainOnScaleIn · advancedboolean—nofalseinherited
managedboolean—nofalse▸ true
namespaceHandlers · component propertyboolean—nofalseinherited
protocolenumwebsocket | sse | long-poll | grpc-stream | udp-multicastnowebsocket▸ websocket
publishTransport · component propertyenumhttp | websocketnohttpinherited
pushFallback · advancedboolean—nofalse▸ false
sequenceNumbers · advancedboolean—nofalseinherited
stampedeGuard · advancedboolean—nofalseinherited
statefulboolean—notrue▸ false
subscriptionsPerUser · advancedinteger—no—inherited
wildcardSubscriptions · component propertyboolean—notrueinherited
Rules that apply · 3

Every rule whose selector covers this component's kind or its category. Whether a rule fires depends on the design: its properties, its edges and its groups.

reconnect-stampede-without-guard

When a gateway holding millions of sockets restarts, every client reconnects at once and the gateway asks the coordination service about each of them. Without a stampede guard that lookup storm takes the coordination service down too.

  • — all of these hold:
  • — the node has at least one synchronous outgoing edge to a coordination-service
  • — the node's `stampedeGuard` is false
shared-host-per-channel-without-isolation

With heavy-tail traffic a few channels carry most of the load. Assigning channels at random lands those hot channels on arbitrary hosts, and every tenant sharing a host suffers for it.

  • — all of these hold:
  • — the node's `channelAssignment` is "random"
  • — the design requirement `traffic.skew` is "heavy-tail"
stateful-websocket-scale-in-without-drain

Scaling a gateway down kills every live WebSocket on the removed instance at once. Without a drain step those clients all reconnect together.

  • — all of these hold:
  • — the node's `autoscaling` is true
  • — the node's `drainOnScaleIn` is false
Use it in a design
nodes:
  - { id: "appsync-events", component: "aws-appsync-events" }
Other Real-time gateway products · 19
Source
# yaml-language-server: $schema=../../schema/component.schema.json
# AWS AppSync Events API: serverless WebSocket pub/sub over channel namespaces. "What is AWS
# AppSync Events?" states AWS manages the WebSocket connections and scaling, clients publish over
# HTTP or WebSocket and subscribe over WebSocket, and OnPublish/OnSubscribe handlers are optional.
schemaVersion: "1"
type: "component"
id: "aws-appsync-events"
kind: "realtime-gateway"
provider: "aws"
docs: "https://docs.aws.amazon.com/appsync/latest/eventapi/event-api-welcome.html"
defaults:
  managed: true
  protocol: "websocket"
  stateful: false
  autoscaling: true
  pushFallback: false
properties:
  authorizationMode:
    type: "enum"
    values: ["api-key", "aws-iam", "amazon-cognito-user-pools", "openid-connect", "aws-lambda"]
  publishTransport:
    type: "enum"
    values: ["http", "websocket"]
    default: "http"
  wildcardSubscriptions:
    type: "boolean"
    default: true
  namespaceHandlers:
    type: "boolean"
    default: false

The same page as markdown, for an agent: /catalogue/components/aws-appsync-events.md