tesla1060
tesla1060

Reputation: 2765

Access third party AWS REST API other than public IP?

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

Answers (2)

AlexK
AlexK

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

Arafat Nalkhande
Arafat Nalkhande

Reputation: 11718

Yes, because the API is hosted in another VPC, you can access that only as follows

  • Using the public IP
  • Using the elastic IP (if that exist)
  • Using the internet facing load balancer (if the EC2 is behind a load balancer)

Upvotes: 1

Related Questions