1.1.1 • Published 1 year ago

@tripplosoftware/simplify-locations v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Simplify Locations

This package serves as a basic abstraction utility library for AWS Location-Service meant, purposefully built to be used on the back-end with Serverless Stack or Serverless Framework. It currently does not have full coverage of the AWS Location Service, only the parts that we needed, more info below.

Requirements

  • A credential file with a default profile or supplying a custom profile is required to use this package.
  • An existing place-index or route-calculator is required depending on which helper you're planning to use.

Authentication

  • Default - The default behavior for this package is to use your default AWS profile within the credentials or the default AWS account environment variables.
  • Custom Profile - If you wish to use a custom AWS profile, in a sandbox environment for example, you add the optional params region & profile to your request. The package will then attempt to retrieve the defined profile from your credentials file.

What is the added value compared to aws-sdk?

  • Central package for all re-used AWS Location-Service helpers/utilities.
  • Batched Concurrency for handling large amounts of location-service requests.
  • Built-in back-off/retry behavior in case of failure.

Usage Example

A simple serverless REST-API request handler. Where an address string is passed to the handler and geocoded data is returned for the supplied address.

Below is an example of the returned result within Insomnia: