2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
https://www.uvicorn.org/#usage
The default interface for uvicorn is 127.0.0.1.
Specify the --host
parameter when starting uvicorn, e.g., uvicorn main:app --port 5000 --host 0.0.0.0
to list on all interfaces
répondu il y a 2 ans
0
The issue you are describing is not related to Security Groups or NACLs. Your connection would time out (as opposed to being rejected) if it were.
Double check if you are requesting the correct IP (public IP of the EC2 in the public subnet) - you can also test with ip a show
on the ec2 console.
You can try to call your running container from your ec2 to check if the docker network is working as expected.
répondu il y a 2 ans
Contenus pertinents
- demandé il y a 2 ans
- demandé il y a 6 mois
- demandé il y a 9 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un mois
- AWS OFFICIELA mis à jour il y a un mois
Thank you @s4zed. I was testing to make api calls from EC2 to my VM. Specifying the
--host
allowed me to make requests from EC2 to my VM. However, making calls from VM to EC2 still throws the same error. There is an image of my security configurations posted at the Stackoverflow question (same questions as here): https://stackoverflow.com/questions/75966975/how-to-open-port-on-ec2-to-allow-api-requests-from-external-ips?noredirect=1#comment133986810_75966975