- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
Hi, After spent a couple of hours I was able to run it. Steps
- Add SSH in the security group as inbound.
- Connect your EC2 instance and install python3 + pip3.
- Install Flask
- Due to Flask security reason you cannot run in Port 80 because it was considered as production App. The current project can be easily run on Port 8080.
- If you want to run on Port 80 then you should use some CGI server as there are plenty of options.
- Before running App on Port 8080 you must add security group inbound rule "Custom TCP" in Port Range : 8080 I hope it will help you
Thanks in advance
Hey, I'm also doing the program on coursera and encountering the same problem. Have reported it as an issue on the course, so hopefully they fix that soon. In the meantime, choosing a different AMI (Amazon Linux 2) makes the instance work as intended, without manually needing to ssh and install stuff. Reference: https://repost.aws/questions/QUXuZePk-bR5ePXWyxqjFLaA/coursera-aws-cloud-technical-essentials-help-exercise-3-launching-an-ec-2-instance
As for the needing to use sudo - "Scripts entered as user data are run as the root user", which is why sudo is not included in the user data script but you need to include it as ec2-user when you ssh. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html#user-data-shell-scripts
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 2 anni fa