π Deploying a Web App Using Amazon ECS Express Modee
This walkthrough shows how to push a Node/Express image to ECR and spin it up with ECS Express Mode. You only need Docker and the AWS CLI; Express Mode builds the network, load balancer, and HTTPS endpoint for you. Every step below is explicit so you can copy/paste without guesswork.
Why Express Mode?
ECS Express Mode is the 2025 way to deploy containers on AWS without having to manage VPCs, subnets, ALBs, certificates, or security groups. AWS provides you with all the minimum viable infrastructure: HTTPS, ALB, networking, scaling, and a public endpoint.
Ideal for: demos, MVPs, personal projects, small APIs, or low-friction microservices.
What We'll Deploy
- Source:
app/server.js(simple Express server with/and/health) - Container build:
Dockerfilein the repo root - Runtime port:
3000
Prerequisites
- Docker installed locally
- AWS CLI v2 configured (
aws configure) with permissions for ECR + ECS - An AWS account (any region that supports ECS Express Mode)
- (Optional) jq installed for nicer CLI JSON output:
brew install jq
Step by Step
Step 1: Clone the Project
git clone https://github.com/r3xakead0/aws-ecs-expressmode.git
π Source code (open-source): r3xakead0/aws-ecs-expressmode
Step 2: Set Helper Variables
export AWS_REGION=us-east-1 # change if needed
export ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
export IMAGE_NAME=aws-ecs-expressmode
export ECR_URI=$ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_NAME
Step 3: Create the ECR Repository
aws ecr create-repository --repository-name $IMAGE_NAME --region $AWS_REGION
(If it already exists, the command will say soβno problem.)
Step 4: Authenticate Docker to ECR
aws ecr get-login-password --region $AWS_REGION \
| docker login --username AWS --password-stdin $ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com
Step 5: Build and Tag the Image
docker build --platform=linux/amd64 -t $IMAGE_NAME .
docker tag $IMAGE_NAME:latest $ECR_URI:latest
--platform=linux/amd64 matches the default Fargate architecture used by Express Mode.
Step 6: Push to ECR
docker push $ECR_URI:latest
Step 7: Deploy with ECS Express Mode (Console, most guided)
1) In the ECS console, click Create and pick Express mode.
2) Select container image β choose Private repository β pick $ECR_URI:latest.
3) Container settings:
- Container port:
3000 - Health check path:
/health - CPU/Memory: leave defaults unless you need more
4) Click Create. ECS provisions:
- VPC, subnets, security groups
- Application Load Balancer with HTTPS
- ECS service + task definition wired to your image
7) Wait for status to become Active.
8) Copy the Application URL; use it in the verify step.
9) Test the Deployment
Cleanup
Step 1: Destroy ECS resources (Console, most guided)
1) In the ECS console, click Cluster and pick default.
2) In the Action option, pick delete cluster
2) This will show when it's finished.
3) Review the cluster no longer exists
Step 2: Delete the ECR Repository
aws ecr delete-repository --repository-name $IMAGE_NAME --force --region $AWS_REGION
What You Learned
- How to build and publish an image on Amazon ECR.
- How to deploy a container using ECS ββExpress Mode without manually creating VPCs, subnets, or ALBs.
- How to get a working HTTPS endpoint in minutes.
- The complete flow: Docker β ECR β ECS Express Mode β Public URL.
Conclusion
ECS Express Mode makes deploying containers fast, guided, and hassle-free.
In just a few steps, you get a secure, scalable, and production-ready service without setting up complex infrastructure.
Perfect for demos, personal projects, or microservices that need to be up and running quickly.











Top comments (0)