Deploy sellable Streamlit-Dashboards with AWS
We are a startup for business analytics based in Germany and want to develop machine learning models for retail, online shops and other applications of middle/small sized companies. For presenting the results streamlit can create shiny interactive dashboards with minimal work — and it is open source so perfect for minimal costs.
But…There are many well written tutorials hosting a streamlit app at heroku — and that is perfect for proof-of-concept apps. But in my point of view are two cons for providing an business partner for example a dashboard of his sales with Heroku
- confidental data: Deploying the streamlit model via github at heroku means the model and dataset is available at GitHub/heroku (there are ways to keep the dataset out of github of course)
- user-authentification: there are some workarounds for creating a team at heroku — but the expectation of a business partner is not creating an heroku account
So…we are using AWS for deploying and serving streamlit apps to the customer. Here I want to share our concept because I didn't found a complete list
- Dataset: Storing customer dataset in S3 buckets, and using the concept of presigned URLs to use the data for python
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-presigned-urls.html - Deploying: One of the best tutorials I ever read with a complete workflow of deploying a streamlit app (coding/Docker/Push to AWS/Fargate/Load Balancer)
https://itnext.io/run-your-containers-on-aws-fargate-c2d4f6a47fda - User authentication: Using Cognito for user authentification of subdomains
https://medium.com/next-level-german-engineering/cognito-user-authentication-alb-api-gateway-13b16f319d32
With this package you get an option to create sellable shiny streamlit apps with all the features of AWS like low monthly costs and scaleable architecture
Follow me now