Example Geo Search API built on AWS Appysnc & Elasticsearch.
Install the Serverless Framework plugins used by the project.
$ npm installCreate an .env file and update the AWS_ACCOUNT_ID variable.
export AWS_ACCCOUNT_ID=123456789$ ./bin/deployRedeploy the lambda function so it has the updated elasticsearch endpoint value created in the last step.
$ ./bin/deploy-lambdaThen invoke it to create the mapping in elasticsearch.
$ ./bin/invoke-lambda$ ./bin/deploy-appsync$ ./bin/update-appsync$ ./bin/destroyCreate a virtualenv then install requirements:
$ make env
$ source env/bin/activate
$ make deps
$ make test
To invoke the lambda function locally do the following.
# .env
export ES_ENDPOINT=https://xxx.xxx.es.amazonaws.com # UPDATE ME
export ES_INDEX=places
export ES_REGION=eu-west-1
export ES_GEO_MAPPING_FILE=elasticsearch/location_geopoint_mapping.json$ ./bin/invoke-local