cognitect-labs / aws-api

AWS, data driven
Apache License 2.0
727 stars 100 forks source link

AWS Location Service Endpoints Missing #247

Open jdhollis opened 10 months ago

jdhollis commented 10 months ago

Ran into an issue using AWS Location Service. It seems that is uses a slightly different endpoint setup than other services. It has sub-services that need to be prepended onto the base region endpoint: https://docs.aws.amazon.com/general/latest/gr/location.html

I looked at endpoints.json, and it doesn’t appear to include any detail for geo below the regional level. So I’m not sure there’s a good way for aws-api to fix this without introducing a special case.

I just wanted to note this here in case anyone else runs into the issue.

The simple fix is to override the endpoint depending on which sub-service you need:

(aws/client {:api :location
             :endpoint-override
             {:hostname "places.geo.us-east-2.amazonaws.com"}})

Dependencies

{:deps {com.cognitect.aws/api       {:mvn/version "0.8.686"}
        com.cognitect.aws/endpoints {:mvn/version "1.1.12.504"}
        com.cognitect.aws/location  {:mvn/version "848.2.1413.0"}
        ,,,}}