user2215659
user2215659

Reputation: 85

IP address location lookup using AWS Services

I have a Java application running on AWS instances, and which uses the AWS SDK for Java v1.12. I'd like to be able to lookup location information based on an IP address, such as city and state. Does AWS provide this service? If so, is there a basic Java example available somewhere?

Upvotes: 2

Views: 5473

Answers (3)

Sid Mathur
Sid Mathur

Reputation: 100

While there is no first-party IP Geolocation service from AWS, Fastah API (I am the lead engineer) provides a SaaS API product on AWS Marketplace that you might find handy. It's a simple REST API with a JSON response, so Java can trivially work with it. The developer quick-start is here.

Upvotes: 1

Michael
Michael

Reputation: 536

While AWS does not offer it as a standalone service, if you only want to lookup the location of your calling clients, CloudFront CDN does offers extra headers you can use to achieve that.

For your use case you can have a look at:

  • CloudFront-Viewer-Country
  • CloudFront-Viewer-City
  • CloudFront-Viewer-Country-Region

ref: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-cloudfront-headers.html#cloudfront-headers-viewer-location

Upvotes: 7

Jesse Barnum
Jesse Barnum

Reputation: 6816

No, AWS does not provide this service.

Upvotes: 6

Related Questions