Dash app using AWS ECS

I recently started Docker-izing simpler Dash apps and running them on a cluster in AWS. I find it simpler and it allows me to avoid thinking too much about the infrastructure on which it runs.

This is useful if the app only needs network connectivity e.g. it pulls from APIs, S3, SQLAlchemy URI etc. This is not useful if your app needs access to local databases, local storage, etc.

I have put an example on GitHub along with step-by-step instructions on how to create and launch.

The app is a normal Dash app and the simple Dockerfile builds an image with only the things the app needs.

FROM python:3.7-alpine
USER root
WORKDIR /app
ADD . /app
RUN pip install --trusted-host pypi.python.org -r requirements.txt
EXPOSE 8050
ENV NAME World
CMD ["python", "app/app.py"]

How have the rest of you moved toward containerization?

Hi @russellthehippo, do you have a pricing estimate for one app with minimal traffic?

Thank you for the guidance!

Also @russellthehippo the link to linuxacademy.com no longer works, seems theyve been bought out. If you can post the mysterious step 4 that would be good! Thank you

Thanks for letting me know - I strongly suggest deploying your app on Fly.io instead which will be both less complex and less expensive.

AWS costs are hard to predict due to VPC + container + bandwidth, but it should never be more than $10 or $20 for a small ECS app.

Quickstart for Fly.io here in the README of another of my projects: GitHub - russellromney/dash-slides: Make easy interactive slides in Python with Dash.

Note I don’t think it’s free anymore, but it’s max $2-$4 per month will a small Dash app - cheaper if you enable stop/start

I am hosting a small app on AWS with EC2 and RDS.

The first year you can use the free tier, that works fine for me so far. The costs are ~5$ for VPC, but no other costs beyond that.