The following lines were my first testing program using AWS EC2 (Window Sever 2019) and streamlit.
The “Network URL” I got was AWS’ Private IPs 172.31.71.27, which can’t be access from outside!
My question is how can Streamlit set the “Network URL” to AWS’ IPv4 Public IP 3.235.195.213, so that everyone can access from the world?
Thank you so much! (After googling, I am so desperately!)
(base) C:\Users\Administrator>streamlit run test.py
Hello, World!
You can now view your Streamlit app in your browser.
Hi @Steve_Chen, welcome to the Streamlit community!
The IP address shown by Streamlit is somewhat misleading when deployed on a cloud service like AWS, as it refers to the IP address of the machine on the AWS internal network. What you need to do is go to the AWS console for the machine you started and see what the external IP address is listed by AWS.
Additionally, you need to open the AWS firewall to allow the post you are using to be accessed by the outside world (by default, 8501). AWS and many other cloud providers have machines closed to the outside world by default for security reasons, so that you don’t accidentally provide access that was unintended.
In the bottom-left corner of the window, Just right next to the Windows Start icon, there is a search icon, click it.
Type firewall
Click check firewall status
Click the advanced setting
Scroll down and click the inbound rule
On the left panel, right click the Inbound Rules
Click new rule
Create an inbound rule by filling in the protocol type with TCP, port numer: 8501…
Find my public IP in EC2 console: 3.235.195.213
In the browser, type 3.235.195.213:8501
And it connected to the streamlit app that I ran in the server.
I’m also running on AWS Windows Server and having the same problem as you were. I tried your solution to add firewall inbound rules to port 8501 and still can’t get streamlit to open on public IP.
Can you give some suggestions ? Am I missing something ?
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.