What are the kind of web application you have launched in AWS ECS in production?

taragrg6 profile image taragurung ・1 min read


Editor guide
dbanty profile image
Dylan Anthony

At my work we have a Two different Flask (Python) REST APIs running in ECS behind load balancers. We also have a service that processes background tasks using Redis/Celery.

Right now ECS is my favorite deployment method, though there are still some slow steps when first setting up your task definitions.

Also Fargate is awesome, it sounds more expensive until you realize you’re only paying for CPU time you actually use! It’s actually saving us money now over reserved instances on EC2.

The only thing I haven’t successfully put on ECS is a service that requires local storage. In theory there’s a way to do it but I couldn’t get it to persist between reboots.

taragrg6 profile image
taragurung Author

So,where are you exactly storing the database. Do you have a container for that also. I would love to hear in more details.

Actually I am looking for a way to use multiple container that are related to each other. In GCP we can easily make the containers contact each other creating a service. Is it possible in ECS?


yloganathan profile image

We have a python (Flask + Gunicorn) API running using ECS fargate in production and we use AWS RDS Postgres as a Database.

The common wisdom is never to run production databases in containers. There are many articles out there explaining why.


Containers are meant for stateless applications that can be scaled without issues.

Yes, you can specify multiple containers in ECS. Check out task definitions in ECS.

dbanty profile image
Dylan Anthony

Our databases are actually not in containers, we use RDS (MySQL) and Elasticache (Redis).

You can definitely communicate between two containers. I think if the containers are on the same instance server (EC2) you can talk directly between them if you use the right networking setup. You can use the concept of a Daemon service to make sure that each backing server has one of the service container you want to share.

Otherwise, you can use the service discovery feature to link services together.