0

My use case: I've got a Spot Tracker that sends location data up every 5 minutes. I'd like to get these pings into AWS Location, so I can do geofencing, mapping, and other fun stuff with them.

Spot offers a REST API that will show the last X number of events, such as:

"messages": {
"message": [
    {
    "id": 1605371088,
    "latitude": 41.26519,
    "longitude": -95.99069,
    "dateTime": "2021-06-26T23:21:24+0000",
    "batteryState": "GOOD",
    "altitude": -103
    },
    {
    "id": 1605371124,
    "latitude": 41.2639,
    "longitude": -95.98545,
    "dateTime": "2021-06-26T23:11:24+0000",
    "altitude": 0
    },
    {
    "id": 1605365385,
    "latitude": 41.25448,
    "longitude": -95.94189,
    "dateTime": "2021-06-26T23:06:01+0000",
    "altitude": -103
    },
    ...
]
}

What's the most idiomatic, cloud-native way to turn these into pings that go into AWS Location?

Here's a diagram of my initial approach: https://imgur.com/a/tqodYs0

The idea is, use a timed Lambda to periodically hit the Spot endpoint, and keep track of the latest one I've sent out in a store like Dynamo:

I'm not an AWS expert, but I feel like there must be a cleaner integration. Are there other tools that would help with this? Is there anything in AWS IOT, for example, that would help me not have to keep track of the last one I uploaded?

matthewsteele
  • 1,797
  • 1
  • 15
  • 31
  • Can you point us to the API documentation? I could only see an API for their Satellite GPS Messenger. – John Rotenstein Jun 29 '21 at 02:16
  • Here's the docs for my particular device: https://www.findmespot.com/en-us/support/spot-gen3/get-help/general/spot-api-support – matthewsteele Jun 29 '21 at 03:04
  • 1
    Unless Spot can push the location notifications to an end-point, you are correct that you would need to poll for the data. If you just want to save the time of the last-retrieved location, you could even just store a file in S3 rather than using DynamoDB. Or, just ignore it and always send the latest to Amazon Location Service. – John Rotenstein Jun 29 '21 at 03:46

0 Answers0