Reputation: 2765
I have an AWS instance, and I want to visit the REST API hosted on another AWS instance on another VPC. Is the only way to access the API through public IP of the server? Or is there any other mechanism for inter-AWS traffic?
Note, the API server is a third party service, I have no control whatever to it, only know that is hosted on AWS.
Upvotes: 0
Views: 249
Reputation: 1420
In addition to the answer of @Arafat Nalkhande, I would like to add that there's another option as well called VPC Peering which does helps you achieve this:
A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them privately. Instances in either VPC can communicate with each other as if they are within the same network
You can also use VPNs, but that would be an overkill.
Edit: As mentioned in the comments, I had misread the question and the solution isn't applicable in the given case.
Upvotes: 0
Reputation: 11718
Yes, because the API is hosted in another VPC, you can access that only as follows
Upvotes: 1