I have been banging my head against a wall trying to get my streamlit app deployed on an ec2 instance so I can share with others, however I am having trouble connecting to my streamlit app via the browser. I noticed that on my local machine I also have the same issue, when I run the streamlit app locally, I am able to access my streamlit app via local host:
http://127.0.0.1:8501/
However the “External URL” and “Network URL” do not work and the page infinitely loads and eventually times out. Here is the external url & network url given by streamlit when you run streamlit run app.py
Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.
You can now view your Streamlit app in your browser.
Network URL: http://<network_ip>:8501
External URL: http://<external_ip>:8501
I can confirm that I have allowed port 8501 TCP inbound traffic on my local windows machine as well as on the ec2 instance.
Here is my security group config:
How do I make my streamlit application accessible via the given Network URL & External URL by streamlit and not just via localhost:8501?
Would appreciate anyone’s advice who has deployed a streamlit web app on an EC2 instance!
I have checked that:
- My ec2 instance is listening on TCP port 8501
- That the streamlit service is running by running “ps aux | grep streamlit”
- Restarting my instance