Creating a health_check endpoint in streamlit

I was wondering whether it is possible to create or modify streamlit to create a health_check endpoint. Streamlit is awesome, and had really cut down on our development time. However, we want to put it in our prod env: using AWS EC2 with load balancer to check whether it passes health_check (i.e. calling the endpoint and returns status code 200-299. I’ve looked through the documentation and seems like setting up an entire flask service is a little bit overkill (and I also haven’t been able to do successfully in our prod env).

Wondering if there is any advice to set this up?

Hi @payaa! The Streamlit server has a GET /healthz endpoint - you can see the code here. Is that sufficient for your use case, or do you need to setup a special health-check endpoint?


1 Like