I have a step function that is running in an AWS account that connects into an RDS database in another account.
I need to reduce the scope of the RDS security group rule but I can find the external IP the function is using to connect to the DB. I was not the one who developed that, so searching in the code looks like it's connecting using psycopg2 in one of the steps of the workflow.
I already checked the NAT Gateway, but the account where step function is executing, does not have one enabled.
Also checked elastic ips but there's no elastic IP attached to the step function.
Any of you know how can I find out the external IP of that step function or the lambdas that are running behind that?
Thank you