I have a stareamlit app, that I would like to deploy to AWS beanstalk using docker. I am able o run the docker image successfully on 0.0.0.0:500 using the command locally on my machine
docker run -p 80:8501 stapp:latest
But, when I try deploying it to AWS using elastic benstalk using the same dockerfile, the app open but it only shows connecting. Looks like its not able to connect. Can somebody help me in pointing out where i might be going wrong?
I’ve tried the advice in the post @monchier linked to (which helped me getting it working via the public IP address at least), but nothing I do makes it work with beanstalk’s URL.
Some things I’ve tried:
configure the EC2 Security group for TCP (this is what got it working with the public IP address)
change the load balancer protocol from HTTP to TCP (that’s with the “Classic Load Balancer”)
I also tried an “Application Load Balancer”
Presumably whatever wrong for me is related to what’s wrong in Working fine via public IP address, but problems with DNS. (Seems like just getting a DNS entry to work should be simpler than getting a load balancer to work, so I tried that but even had trouble there.)
No, David, I am still in the same trouble. Although, I got it working on azure web apps service. But again, the app works fine for some time after I restart, but again it starts hanging up and connecting…
Is the app not working at all for you on Beanstalk? Or, is it working via public IP but not via DNS?
It seems @dchudz was able to get his app fully working on Beanstalk by following Matteo’s comment, the steps he posted in his comment above and also by following the instructions in this comment.
When you said the following, were you talking about Azure or Beanstalk?
But again, the app works fine for some time after I restart, but again it starts hanging up and connecting
Hi all,
I was running into the same issue. I would suggest uploading a dockerrun.aws.json in the source code origin upload when creating the environment in beanstalk. I had to specify both containerport and Hostport as 8501. The dockerrun.aws.json file that worked for me was as follows:
Do I first need to have an EC2 instance created with those ports open to run the image? I tried this with my image from dockerhub and I get these errors:
100.0 % of the requests are failing with HTTP 5xx.
ELB processes are not healthy on all instances.
ELB health is failing or not available for all instances.
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.