{"id":19274044,"url":"https://github.com/sbstjn/serverless-geoip","last_synced_at":"2025-04-21T22:33:30.108Z","repository":{"id":137671405,"uuid":"109306929","full_name":"sbstjn/serverless-geoip","owner":"sbstjn","description":"Use MaxMind GeoLite2 database with AWS Lambda","archived":false,"fork":false,"pushed_at":"2018-05-11T04:15:02.000Z","size":23,"stargazers_count":45,"open_issues_count":1,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T16:24:23.195Z","etag":null,"topics":["geoip","geolib","geolite2","lambda","maxwind","serverless"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbstjn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-02T19:02:58.000Z","updated_at":"2024-11-09T19:41:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e58fcd6-bdea-458e-aa44-2ba81d49e0f2","html_url":"https://github.com/sbstjn/serverless-geoip","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/sbstjn%2Fserverless-geoip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fserverless-geoip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fserverless-geoip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbstjn%2Fserverless-geoip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbstjn","download_url":"https://codeload.github.com/sbstjn/serverless-geoip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250145370,"owners_count":21382403,"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":["geoip","geolib","geolite2","lambda","maxwind","serverless"],"created_at":"2024-11-09T20:44:55.570Z","updated_at":"2025-04-21T22:33:30.096Z","avatar_url":"https://github.com/sbstjn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless GeoIP\n\nUse AWS Lambda and [MaxMind GeoLite](http://dev.maxmind.com/geoip/geoip2/geolite2/) to query for locations of IP addresses. You can invoke the function or use API Gateway to send an HTTP request with the IP address to lookup.\n\n## Install\n\n```bash\n$ \u003e git clone git@github.com:sbstjn/serverless-geoip.git\n$ \u003e cd serverless-geoip\n$ \u003e yarn install\n```\n\n## Configure\n\nDownload the [GeoLite2 City](http://dev.maxmind.com/geoip/geoip2/geolite2/) database and store the file inside the `data` folder.\n\n```bash\n.\n└── data\n    └── GeoLite2-City.mmdb\n```\n\n## Deploy \n\n```bash\n$ \u003e yarn deploy\n\n…\n\nendpoints:\n  GET - https://randomid.execute-api.us-east-1.amazonaws.com/dev/ip/{ip}\n```\n\n## Usage\n\n### Invoke\n\n```bash\n$ \u003e sls invoke -f lookup --data '{ \"ip\": \"8.8.8.8\" }'\n\n{\n    \"continent\": {\n        \"code\": \"NA\",\n        \"geoname_id\": 6255149,\n        \"names\": {\n            \"de\": \"Nordamerika\",\n            \"en\": \"North America\",\n            \"es\": \"Norteamérica\",\n\n…\n…\n```\n\n### HTTP Request\n\n```bash\n$ \u003e curl https://randomid.execute-api.us-east-1.amazonaws.com/dev/ip/8.8.8.8\n\n{\"continent\":{\"code\":\"NA\",\"geoname_id\":6255149,\"names\":{\"de\":\"Nordamerika\",\"en\":\"North America\", …\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Fserverless-geoip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbstjn%2Fserverless-geoip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbstjn%2Fserverless-geoip/lists"}