AWS’s WebSocket front door against a realtime platform: what you build on connection IDs versus what channels give you.
API Gateway WebSocket APIs terminate sockets and route frames to Lambda or other backends. There are no channels, no fanout, and no state: you store connection IDs and broadcast by calling the management API once per connection. That makes it a very flexible pipe, and a lot of assembly.
When Foony fits
Fanout is the product. On API Gateway, broadcasting to 10,000 users means 10,000 @connections API calls your code orchestrates, typically with DynamoDB bookkeeping. On Foony it is one publish.
Connections that last. API Gateway closes every socket after 2 hours and idles out at 10 minutes, so clients live in reconnect loops. Foony holds connections with keep-alive pings.
Presence, history, ordering, and reconnect recovery exist. API Gateway has none of them, its developer guide does not even document delivery guarantees.
Message sizes: API Gateway frames cap at 32 KB with 128 KB per message, and billing rounds every 32 KB into another message unit.
Reconnect storms are not a quota problem. API Gateway defaults to 500 new connections a second per account per region.
When Amazon API Gateway WebSockets fits
Everything else is already AWS: IAM auth on $connect, Lambda handlers, CloudWatch, and compliance inheritance.
True pay-per-use at tiny scale: a low-traffic internal tool can cost single-digit dollars a month.
You want a custom protocol over the socket and full control of what every frame means.
Features
Foony
Amazon API Gateway WebSockets
Fanout
One publish reaches every subscriber
One @connections API call per recipient, orchestrated by your code
Presence
Built in, with automatic re-entry on reconnect
None, track connection IDs in DynamoDB yourself
History
Per-prefix channel rules, up to 30 days
None
Connection lifetime
Held open with keep-alive pings
2 hours maximum, 10 minute idle timeout
Delivery
Effectively exactly once (idempotent publish, client dedup)
Not documented
Limits and pricing
Foony
Amazon API Gateway WebSockets
Pricing model
Per message, in and out
$1 per million messages (32 KB increments) plus $0.25 per million connection minutes
1M messages and 750k connection minutes, first 12 months only
Competitor numbers last checked July 2026. If something has drifted, tell us and we will fix it.
Moving over
Moving off API Gateway usually deletes code: the DynamoDB connection table, the fanout loop, and the reconnect handling all disappear into channel subscribe and publish. Lambda handlers that produced messages keep working, publishing over Foony’s REST API instead of the @connections endpoint.
Try it on the free tier
9M messages a month, presence, history, and the Pusher-compatible API are all on the free plan. No card required.