{"id":13558610,"url":"https://github.com/techjacker/appsync-elasticsearch-geosearch","last_synced_at":"2025-03-25T19:32:38.252Z","repository":{"id":50206173,"uuid":"136073101","full_name":"techjacker/appsync-elasticsearch-geosearch","owner":"techjacker","description":"Example Geo Search API built on AWS Appysnc \u0026 Elasticsearch","archived":false,"fork":false,"pushed_at":"2022-12-08T02:13:22.000Z","size":23,"stargazers_count":16,"open_issues_count":4,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-02T12:50:25.879Z","etag":null,"topics":["aws-appsync","elasticsearch","geosearch"],"latest_commit_sha":null,"homepage":"https://andrewgriffithsonline.com/blog/build-geosearch-graphql-api-aws-appsyncelasticsearch","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techjacker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-04T19:29:27.000Z","updated_at":"2021-10-11T04:09:21.000Z","dependencies_parsed_at":"2023-01-25T03:15:30.084Z","dependency_job_id":null,"html_url":"https://github.com/techjacker/appsync-elasticsearch-geosearch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fappsync-elasticsearch-geosearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fappsync-elasticsearch-geosearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fappsync-elasticsearch-geosearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Fappsync-elasticsearch-geosearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techjacker","download_url":"https://codeload.github.com/techjacker/appsync-elasticsearch-geosearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222090823,"owners_count":16929472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-appsync","elasticsearch","geosearch"],"created_at":"2024-08-01T12:05:03.554Z","updated_at":"2024-10-29T18:17:24.968Z","avatar_url":"https://github.com/techjacker.png","language":"Shell","funding_links":[],"categories":["Shell","others"],"sub_categories":[],"readme":"# Appsync Elasticsearch Geo Search\n\nExample Geo Search API built on AWS Appysnc \u0026 Elasticsearch.\n\n\n-----------------------------------------------------------\n## Example Usage\n\n### 1. Set up\n\nInstall the Serverless Framework plugins used by the project.\n```Shell\n$ npm install\n```\n\nCreate an `.env` file and update the `AWS_ACCOUNT_ID` variable.\n```Shell\nexport AWS_ACCCOUNT_ID=123456789\n```\n\n### 2. Deploy Elasticsearch\n```Shell\n$ ./bin/deploy\n```\n\n### 3. Create Elasticsearch Geo Mapping\nRedeploy the lambda function so it has the updated elasticsearch endpoint value created in the last step.\n```Shell\n$ ./bin/deploy-lambda\n```\n\nThen invoke it to create the mapping in elasticsearch.\n```Shell\n$ ./bin/invoke-lambda\n```\n\n### 4. Deploy the Appsync API\n```Shell\n$ ./bin/deploy-appsync\n```\n\n### 5. Update the Appsync API.\n```Shell\n$ ./bin/update-appsync\n```\n\n### 6. Destroy Stack\n```Shell\n$ ./bin/destroy\n```\n\n\n-----------------------------------------------------------\n## Lambda Development Setup\n\nCreate a virtualenv then install requirements:\n```\n$ make env\n$ source env/bin/activate\n$ make deps\n```\n\n-----------------------------------------------------------\n## Unit Tests\n```\n$ make test\n```\n\n-----------------------------------------------------------\n\n## Local Development\n\nTo invoke the lambda function locally do the following.\n\n#### 1. Add the following to the `.env` file\n```Shell\n# .env\nexport ES_ENDPOINT=https://xxx.xxx.es.amazonaws.com # UPDATE ME\nexport ES_INDEX=places\nexport ES_REGION=eu-west-1\nexport ES_GEO_MAPPING_FILE=elasticsearch/location_geopoint_mapping.json\n```\n\n#### 2. Invoke the lambda function.\n```Shell\n$ ./bin/invoke-local\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Fappsync-elasticsearch-geosearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechjacker%2Fappsync-elasticsearch-geosearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Fappsync-elasticsearch-geosearch/lists"}