Can't establish connection with my postgresql from inside of the custom actions which is running on docker

I have installed my rasa x on kubernetes cluster that is running on GCP, action server is running on docker. But then I have my postgresql db in AWS RDS and I have a custom action that queries this db to pull info as per the conversation flow. After I deployed my assistant with rasa x, this custom action is not working, can’t establish connection with the db. How can I fix this?