Coder Social home page Coder Social logo

kristianmandrup / appsync-elasticsearch-geosearch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from techjacker/appsync-elasticsearch-geosearch

0.0 3.0 0.0 13 KB

Example Geo Search API built on AWS Appysnc & Elasticsearch

Home Page: https://andrewgriffithsonline.com/blog/build-geosearch-graphql-api-aws-appsyncelasticsearch

Makefile 11.60% Shell 48.48% Python 39.92%

appsync-elasticsearch-geosearch's Introduction

Appsync Elasticsearch Geo Search

Example Geo Search API built on AWS Appysnc & Elasticsearch.


Example Usage

1. Set up

Install the Serverless Framework plugins used by the project.

$ npm install

Create an .env file and update the AWS_ACCOUNT_ID variable.

export AWS_ACCCOUNT_ID=123456789

2. Deploy Elasticsearch

$ ./bin/deploy

3. Create Elasticsearch Geo Mapping

Redeploy the lambda function so it has the updated elasticsearch endpoint value created in the last step.

$ ./bin/deploy-lambda

Then invoke it to create the mapping in elasticsearch.

$ ./bin/invoke-lambda

4. Deploy the Appsync API

$ ./bin/deploy-appsync

5. Update the Appsync API.

$ ./bin/update-appsync

6. Destroy Stack

$ ./bin/destroy

Lambda Development Setup

Create a virtualenv then install requirements:

$ make env
$ source env/bin/activate
$ make deps

Unit Tests

$ make test

Local Development

To invoke the lambda function locally do the following.

1. Add the following to the .env file

# .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

2. Invoke the lambda function.

$ ./bin/invoke-local

appsync-elasticsearch-geosearch's People

Contributors

techjacker avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.