So im new to ec2 and aws , i created a account yesterday and opened a ubuntu instance, i can update and upgrade or install new packages but the problem comes when using a api that connects to a game api
https://gitlab.com/man90/black-desert-social-rest-api
I build and run api on the instance and runs normal.
Problem is when calling the api for some reason i get 404 not found response.
Used configuration:
Proxies: []
Port: 8001
Cache TTL: 180 minutes
2021/12/30 07:34:29 Listening for requests
but when calling api from python i got 404 not found response, so ec2 instance cannot resolve domain or is unrecehable.
ubuntu@ip-XXX-XXX-XXX-XXXX:~/bdo/guild-scraping$ python3 gsheet.py
404 page not found
if i ping the page from ec2 instance works as normal, but for some reason, running api and calling it from python is giving error
ubuntu@ip-XXX-XXX-XXX-XXX:~/bdo/guild-scraping$ ping www.naeu.playblackdesert.com
PING ds7lduf.impervadns.net (45.223.17.187) 56(84) bytes of data.
64 bytes from 45.223.17.187 (45.223.17.187): icmp_seq=1 ttl=33 time=8.27 ms
64 bytes from 45.223.17.187 (45.223.17.187): icmp_seq=2 ttl=33 time=8.15 ms
64 bytes from 45.223.17.187 (45.223.17.187): icmp_seq=3 ttl=33 time=8.13 ms
64 bytes from 45.223.17.187 (45.223.17.187): icmp_seq=4 ttl=33 time=8.18 ms
64 bytes from 45.223.17.187 (45.223.17.187): icmp_seq=5 ttl=33 time=8.16 ms
if i ping the api outside my code from python happens the same, so idk if my code cannot reach api for some reason or api itself cannot reach internet game website.
import requests
r = requests.get("http://localhost:8001/v1/guild", params=payload)
print(r.text)
404 page not found