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

  • Assign public IPs and talk via the internet, which in practice will probably stay within the AWS data center. Your question is not entirely clear, and if you shared high level what you're trying to achieve you might get more help than with a purely technical question. – Tim Jun 13 '18 at 6:33
  • This question reminds me of another recent question, possibly this one. Tunnels or proxies would be needed to work around the transit traffic constraints of VPC peering. – Michael - sqlbot Jun 13 '18 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.