I have a lambda in VPC-1 trying to access a SQL database which is hosted inside an EC2 instance in VPC-2. How should I establish a connection between Lambda(VPC-1) and SQL DB (VPC-2) using VPC endpoint? What configuration I need to do in infrastructure and code?
I don't want to do VPC peering as it is not allowed in my organization.