# Building resilient real-time streaming workers with Amazon DynamoDB leases

DevFeed: [Building resilient real-time streaming workers with Amazon DynamoDB leases](<https://devfeed.tech/articles/building-resilient-real-time-streaming-workers-with-amazon-dynamodb-leases-4637.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/architecture/building-resilient-real-time-streaming-workers-with-amazon-dynamodb-leases/>)

Author: Siddhesh Tiwari

Published: 2026-09-10T16:14:22Z

Content type: tutorial

Language: en

Sources: [AWS Architecture Blog](<https://devfeed.tech/sources/aws-architecture-blog.md>)

Topics: [WebSocket](<https://devfeed.tech/topics/websocket.md>), [Amazon EC2](<https://devfeed.tech/topics/amazon-ec2.md>), [Amazon Elastic Kubernetes Service](<https://devfeed.tech/topics/amazon-elastic-kubernetes-service.md>)

Tags: [advanced-300](<https://devfeed.tech/tags/advanced-300.md>), [amazon-dynamodb](<https://devfeed.tech/tags/amazon-dynamodb.md>), [amazon-ec2](<https://devfeed.tech/tags/amazon-ec2.md>), [amazon-eks](<https://devfeed.tech/tags/amazon-eks.md>), [amazon-elastic-container-service](<https://devfeed.tech/tags/amazon-elastic-container-service.md>), [aws-fargate](<https://devfeed.tech/tags/aws-fargate.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>), [workers](<https://devfeed.tech/tags/workers.md>)

## AI overview

A tutorial for building resilient real-time WebSocket workers with Amazon DynamoDB leases. It covers conditional-write ownership, orphan reconciliation for automatic failover, and graceful shutdown to reduce deployment downtime on Amazon ECS and AWS Fargate.

## Source excerpt

Real-time streaming workers that hold hundreds of persistent WebSocket connections lose data when a worker fails. Learn how to build a WebSocket fleet management system on Amazon ECS and AWS Fargate that uses Amazon DynamoDB conditional writes as a distributed lease to track ownership, fail over automatically, and deploy with low downtime.