Forums

IP Address for AWS RDS Database Inbound Traffic

I have a Postgres database in AWS, and I created a web app in Python/Django to run a query on that database. Right now, I have a security group on my AWS database that allows access from my own IP address so the database works locally, and I want to set it to allow my PythonAnywhere site to access it as well. I tried to run an nslookup on my PythonAnywhere site and added that IP address to the list of permitted inbound traffic, but that didn't seem to work. The PythonAnywhere site works if I allow ALL inbound traffic on the AWS databse, but everything I've read says that you shouldn't allow all traffic, and instead you should limit inbound traffic to just the IP addresses that need to access it.

Is there a standard way to allow inbound traffic for a PythonAnywhere site? Apologies of any of this doesn't make sense - This is the first time I've ever tried to make a website (or use Python, Django, Postgres, or AWS - call it a big learning experience).

Take a look at https://help.pythonanywhere.com/pages/StaticIPForExternalAllowlists