I have a requirement that one of my EC2 instance's originating traffic to a specific ip address needs to land to a ENI of a different EC2 instance which is present in different account and different VPC.
To explain, lets say I have a ec2 instance with IP1 and need to transfer data to ec2 with IP3 but traffic has to be routed to ec2 with IP2 which takes care of routing it to IP3. IP1 is in AWS and IP3 is in Azure.
IP2 is of a instance which acts as a gateway which can route direct traffic to IP3.
A cross account vpc peering can not help as it will only direct the traffic to the pcx connection and can only help if IP3 was in IP2's vpc.
Please note IP1 and IP2 are in different VPC's in AWS and IP3 is in Azure I already have a set up that if any packet is sent to IP2 instance it will direct to IP3..So all I need is IP1 needs to hit IP2 ENI..
Any help is appreciated