AWS equivalent service to Google Maps API Distance Matrix

Does an AWS equivalent exist to this service? https://developers.google.com/maps/documentation/distance-matrix/intro

Use case: one of our biggest clients is a national retailer and wants to calculate driving distances between shops and customer addresses.

I would want to pipe in two addresses and get the static driving distance between the two; dynamic/realtime traffic conditions is not required.

As a daily AWS user/architect with quite some certifications, I am not aware of such service. But then again, AWS spews out new services like crazy so hard to keep up. But saw nothing like this on my RSS feeds last couple of months.

Even though you use AWS, you can still use Google services/GCP or other platforms. Nothing wrong with a mutli cloud strategy and in some cases even recommend in my opinion.

There is no such service. You can geocode locations and use databases like Postgres or Hive/Presto to perform geospatial queries.

I don’t believe aws has a lot of geo location stuff. But you certainly can call the Google API from Amazon.

That’s exactly what I’m planning to do now - with a backend cache so I don’t re-run on the same address pairs. (edit: Google’s Maps’ TOS may prevent this)

Sounds like a service we need built into AWS though! I can’t imagine Amazon: the premier shipper of shipments in the US, doesn’t have an amazing backend system that does exactly this for optimizing driver routes.

If you do end up calling the Google API from AWS, this seems like a set of data that wouldn’t change very often-- so you could potentially cache responses in S3 or elsewhere.

I don’t think it will happen. Google has had the technology and tooling for direction optimization for years. They had to for Gmaps. It would be a bigger investment by AWS for something that may not be as good as google’s service (remember Apple maps?)

It is easy enough to just query google’s APIs. It sounds like a good cloudformation template though.

No such AWS service. There are many routing services that also calculate the distance matrix, and most of them have some in-house code or open-source software. DM me if you want more information and/or advice.

Source: am engineer that coded this type of software.

Amazon has tons of this kind of stuff for last mile delivery (flex, etc), just nothing publicly available yet

It’s a data-driven service. Imagine how hard it would be for Amazon to create all that data that Google’s customers have created. Honestly, they would probably just have to buy the data from Google at that point! That’s essentially what you’re doing by using the geocoding API, you’re buying the data from Google :slight_smile:

That is something that I would look to map data API companies to provide. Google offers it, so does this company under navigation APIs https://www.mapbox.com/pricing/ , and probably many others if you were to shop around.

I don’t even know right now how AWS marketplace billing works but if there is a convenience benefit you might search for service providers that sell thru that, like https://aws.amazon.com/marketplace/pp/B07JPLG9SR?qid=1590079282926 . That is just a quick search for an example.

I’ve got deep knowledge of an open source solution called OSRM (Open Source Routing Machine). If you want to set up this as your solution PM me and I’ll help you! I currently have an OSRM hosted on AWS in an EC2 for testing purposes.

I’d like to add, that if you end up doing something like this, you probably should account for traffic. Not accounting for traffic is just giving bad managers ammunition to constantly yell at overworked employees.

Similarly, a daily AWS user/architect with quite some certifications, whose current day job is in the geospatial / telematics for cars. There isn’t one that we’ve come across, nor am I aware that there’s a service in the pipeline.

Great insight! And you’re not kidding about the confusion. I just went through the TOS: https://cloud.google.com/maps-platform/terms/maps-service-terms

There are reasonable exceptions carved out for caching almost everything EXCEPT the Distance Matrix.

Nifty! I was just looking at this as an alternative. Does it output distances and not just times? OSM’s domestic U.S. maps are fantastic AFAIK so hosting my own OSRM API might be far cheaper than using Google’s Distance Matrix or traveltime.com’s API.

Yep! It does output distances! In fact, a while ago I built with OSRM an API which told you the routes and hazard scores attached to them based on previous accidents. It was the winner of a hackathon based in Barcelona, Spain.

It’s hosted on http://safeways.movurb.com (you can move the markers around and you’ll see the route changing). If you press F12 you’ll see the API calls to the API Gateway (it’s open to use). Note that this only works in Barcelona.

Again. Have a look at it and send me a message if you want to set up a call to help you!

big enough volume sure is. matrix api gets expensive quick

We use GraphHopper for this and it’s a lot cheaper than Google

https://docs.graphhopper.com/#tag/Matrix-API

Yeah, it seems usable now; but I do still remember when it first launched and they didn’t include support for any one way streets in my city, which is almost entirely one way streets downtown. It was beyond useless