For background I am using AWS elastic container service or ECS. The application I am deploying is a Django application that uses a Postgres database for Django dependencies. Previously I was able to use the application server IP as the host name for connecting through Pgadmin. However when now using ECS to deploy my application and having a docker container host the application, I am no longer able to access the database through PGadmin. I’ve tried using the ECS instance private IP as well as the server name for the application (domain name). But neither of those seem to work and I’m a bit stuck on which host name I need to use to associate it with the database in order to enter in to make manual changes. For more relevant information, I’m deploying the Postgres RDS in AWS and I’m just referencing its credentials in my container application, therefore, I am not deploying Postgres as a sidecar or separate container within my ECS service.
Any thoughts on which host name to use? Or a way to access my database manually?
I’ve tried using the ECS instance private IP, the domain name associated with the application, and the host name “localhost”. I need to be able to connect to PGadmin locally for my RDS server which is hosted in a private subnet.
Kbranch is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.