
Day 37: Amazon ECS Express Mode – Deploying a Container as a Web Service with One Setup Step
Day 37 of my 90-day AWS challenge: how Amazon ECS Express Mode deploys a container image with a load balancer, HTTPS, scaling, and monitoring set up automatically, why it replaces App Runner for new projects, and how it compares to Elastic Beanstalk and standard ECS.
Recap of Day 36
Yesterday I deployed a Java application with Elastic Beanstalk, which sets up servers, a load balancer, and scaling around an uploaded JAR. Today I'm looking at the container version of that idea: Amazon ECS Express Mode.
A note on App Runner
AWS App Runner was the service built for this job, and many tutorials still feature it. AWS closed App Runner to new customers on April 30, 2026. Existing customers can keep using it, but AWS is not adding new features, and it recommends ECS Express Mode for new projects. That is why I'm covering Express Mode today.
What is ECS Express Mode?
ECS Express Mode is a capability inside Amazon ECS (Day 17) that deploys a containerized web application with sensible defaults. Instead of configuring a cluster, task definition, service, load balancer, scaling, and networking myself, I give it three things:
- A container image
- A task execution role
- An infrastructure role
Express Mode then creates and configures what the application needs.
What it sets up for me
- A Fargate-based ECS service (no servers to manage) with a unique URL
- An Application Load Balancer with HTTPS (SSL/TLS)
- Auto scaling policies based on utilization or traffic
- CloudWatch logs and monitoring
- Networking components such as security groups
The resources are normal AWS resources in my own account. I can see them in the console and change them through the ECS and other service APIs, for example to add a task role that gives the application permission to use other AWS services. Express Mode also supports custom task definitions. It can share one load balancer across multiple Express Mode services that use the same networking setup, which helps keep costs down.
The two IAM roles
Role | What it allows |
|---|---|
Task execution role | Lets ECS pull the image and write logs. The managed policy AmazonECSTaskExecutionRolePolicy covers this |
Infrastructure role | Lets ECS create and manage the supporting resources, such as the load balancer and security groups. It uses a managed policy made for Express Mode services |
This is least privilege from Day 2 in practice: each role has one job.
What it is good for, and what it isn't
Good for: stateless web applications and APIs that serve HTTP requests, prototypes, and teams that want to deploy independently without deep AWS knowledge.
Not for: workloads that need something other than an Application Load Balancer. The load balancer can't be replaced with a Network Load Balancer or removed, so TCP/UDP passthrough or a service without a load balancer calls for a standard ECS service instead.
It also needs a container image. Unlike App Runner's source-code option, I have to containerize the application first, which for my Java project means the Dockerfile and image push I did on Day 17.
Ways to create a service
The ECS console, the AWS CLI, the SDKs, CloudFormation, and Terraform. There is also a GitHub Actions action for deploying an Express Mode service, which fits the CI/CD pipeline ideas from Day 18.
Cost
There is no extra charge for Express Mode. I pay for the underlying resources: Fargate compute, the Application Load Balancer, CloudWatch logs and metrics, and data transfer. The load balancer and running tasks bill hourly, so delete practice services.
Choosing a hosting option
Option | Control | Effort | Best for |
|---|---|---|---|
Lambda (Day 8) | Low | Low | Event-driven code |
Elastic Beanstalk (Day 36) | Medium | Low | Uploading code or a JAR to a managed environment |
ECS Express Mode | Medium | Low | A container image that should become a web service quickly |
Standard ECS or Fargate (Day 17) | High | Medium | Complex networking, other load balancer types, and full control |
EC2 (Day 3) | Full | High | Custom setups |
How it connects to earlier days
- Day 17: the Dockerfile, the image, and ECR are the input
- Day 10: it uses an Application Load Balancer and auto scaling
- Day 9: logs and metrics go to CloudWatch
- Day 5: the tasks run in VPC subnets with security groups
- Day 19: environment variables and secrets, with secrets coming from Secrets Manager
- Day 16: it can be created with CloudFormation
What I practiced today
- Used the container image of my Java application from the earlier containers day, pushed to ECR
- Created the task execution role and the infrastructure role
- Created an Express Mode service in the ECS console, setting the image, the container port, and a health check path
- Opened the HTTPS URL and checked the response
- Looked at the resources that Express Mode created, such as the cluster, service, load balancer, and log group
- Deleted the service and the image afterwards
Key takeaways
- Express Mode gives a container a URL, HTTPS, scaling, and logs from one setup step
- The underlying resources are mine, so I can inspect and extend them
- For new projects, use ECS Express Mode instead of App Runner
- The load balancer and Fargate tasks bill while they run, so delete practice services
Up next: Day 38
AWS Amplify: hosting front-end and full-stack web apps.
Learning AWS too? Follow along and share what you're building. #90DaysOfAWS
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article