Calling Database from Citrix machine and not original machine

Hi,

I’ve got a citrix server which I must login to in order to connect to a VPN (the VPN can only be accessed from this server for security reasons).
Once I connect to that VPN I am then able to connect to my AWS database (when I do it manually).

I am running into an issue where I can automate a bot logging in to citrix and enabling the VPN, but when I try to connect to the database, it is still trying to perform them off the original machine, which doesn’t have access to that database.

Has anyone encountered & resolved this issue before, or does someone know how to run the connect/execute database activities from citrix and not the original machine?

Cheers
VPN Citrix DB