# Deploy Blazor Server applications on Amazon ECS with AWS Fargate

DevFeed: [Deploy Blazor Server applications on Amazon ECS with AWS Fargate](<https://devfeed.tech/articles/deploy-blazor-server-applications-on-amazon-ecs-with-aws-fargate-102778.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/dotnet/deploy-blazor-server-applications-on-amazon-ecs-with-aws-fargate/>)

Author: Mayank Kumar

Published: 2026-10-27T10:30:08Z

Content type: article

Language: en

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

Topics: [AWS Fargate](<https://devfeed.tech/topics/aws-fargate.md>), [Blazor](<https://devfeed.tech/topics/blazor.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [WebSocket](<https://devfeed.tech/topics/websocket.md>), [SignalR](<https://devfeed.tech/topics/signalr.md>), [Cloud Networking](<https://devfeed.tech/topics/cloud-networking.md>), [ASP.NET Core](<https://devfeed.tech/topics/asp-net-core.md>), [Web app](<https://devfeed.tech/topics/webapp.md>), [TLS (Transport Layer Security)](<https://devfeed.tech/topics/tls.md>), [Amazon ElastiCache](<https://devfeed.tech/topics/amazon-elasticache.md>)

Tags: [amazon-cloudfront](<https://devfeed.tech/tags/amazon-cloudfront.md>), [amazon-elastic-container-service](<https://devfeed.tech/tags/amazon-elastic-container-service.md>), [applications](<https://devfeed.tech/tags/applications.md>), [asp-net](<https://devfeed.tech/tags/asp-net.md>), [aws](<https://devfeed.tech/tags/aws.md>), [aws-cloud-development-kit](<https://devfeed.tech/tags/aws-cloud-development-kit.md>), [aws-fargate](<https://devfeed.tech/tags/aws-fargate.md>), [aws-transform](<https://devfeed.tech/tags/aws-transform.md>), [blazor](<https://devfeed.tech/tags/blazor.md>), [circuit](<https://devfeed.tech/tags/circuit.md>), [component](<https://devfeed.tech/tags/component.md>), [deploy](<https://devfeed.tech/tags/deploy.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [ecs](<https://devfeed.tech/tags/ecs.md>), [forms](<https://devfeed.tech/tags/forms.md>), [framework](<https://devfeed.tech/tags/framework.md>), [legacy](<https://devfeed.tech/tags/legacy.md>), [memory](<https://devfeed.tech/tags/memory.md>), [model](<https://devfeed.tech/tags/model.md>), [modernizing](<https://devfeed.tech/tags/modernizing.md>), [net](<https://devfeed.tech/tags/net.md>), [programming](<https://devfeed.tech/tags/programming.md>), [server](<https://devfeed.tech/tags/server.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>)

## AI overview

Blazor Server circuits live in one process's memory, so ECS deployments must preserve task affinity and WebSocket connectivity while treating circuits as disposable. The described AWS CDK for C# setup places Fargate tasks behind an internal Application Load Balancer reached through CloudFront VPC origin; target group cookies keep a browser on one task, and CloudFront disables caching and forwards viewer data for application traffic while separate behaviors cache static assets. It aligns SignalR keep-alives (15 seconds), long-poll timeout (45 seconds), and CloudFront and load balancer limits (60 seconds), and uses a 60-second deregistration delay for in-flight requests. Replaced tasks still disconnect circuits, so persistent session data must live outside them, such as in RDS PostgreSQL, ElastiCache Redis, or device-local browser storage, and be rehydrated after reconnect. The sample uses a single Availability Zone to reduce cost and calls for multi-zone deployment in production; its 1 GiB task is sample-sized and should be sized from workload measurements. Shared Data Protection keys via Systems Manager require task permissions and network access to an SSM endpoint.

## Source excerpt

When modernizing legacy ASP.NET Web Forms applications with tools such as AWS Transform, Blazor Server is often recommended as the target framework. With Blazor, you gain a familiar component-based programming model - but you also inherit a deployment challenge. Blazor Server maintains a persistent WebSocket connection and an in-memory circuit for each browser session, which [...]