Skip to content
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.

Latest commit

 

History

History
20 lines (13 loc) · 1.38 KB

README.md

File metadata and controls

20 lines (13 loc) · 1.38 KB

Proximity Events Webhook Parser

A simple AWS Lambda function that 'queues' geolocation trigger events from the Proximity Events iPhone app in an SNS topic. Designed to be run via the AWS API Gateway as a Lambda proxy function.

(I don't have any relation to the Proximity Events app; I just found it an easy way to enable some location-based automation in my life!)

This function attempts to normalise the data received from the app, because sometimes it sends JSON and sometimes it sends x-www-form-urlencoded data, with different fields provided for each. I'm not sure why, but there you go.

Other than that, this func tries to do its job quickly and get out of the way, while providing some error reporting if something goes wrong. I suggest using cloudwatchToPapertrail or another log monitoring tool to pick up what's happening.

There are no dependencies to install.

TODO

  • Add setup and installation instructions (or a script to do it)
  • Add better tests
  • Add timezone handling (using a geolocation time zone API?)
  • Make the Visit:Exit event dropping configurable
  • Use a reverse geocoding service to get the address for form data events
  • Publish to npm