{"id":30670634,"url":"https://github.com/tmaiaroto/go-lambda-geoip","last_synced_at":"2025-10-12T06:34:07.394Z","repository":{"id":137341303,"uuid":"44654704","full_name":"tmaiaroto/go-lambda-geoip","owner":"tmaiaroto","description":"An example using AWS Lambda with Go","archived":false,"fork":false,"pushed_at":"2018-05-19T21:00:03.000Z","size":1103,"stargazers_count":85,"open_issues_count":1,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-06-20T13:34:26.455Z","etag":null,"topics":["aws-lambda","geolocation","golang","maxmind"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmaiaroto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-10-21T05:30:33.000Z","updated_at":"2024-02-26T10:46:55.000Z","dependencies_parsed_at":"2023-07-07T12:45:19.077Z","dependency_job_id":null,"html_url":"https://github.com/tmaiaroto/go-lambda-geoip","commit_stats":{"total_commits":11,"total_committers":3,"mean_commits":"3.6666666666666665","dds":0.4545454545454546,"last_synced_commit":"5afb12df0f9cf7c7dc18f8158a01f9deacc76531"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tmaiaroto/go-lambda-geoip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaiaroto%2Fgo-lambda-geoip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaiaroto%2Fgo-lambda-geoip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaiaroto%2Fgo-lambda-geoip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaiaroto%2Fgo-lambda-geoip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmaiaroto","download_url":"https://codeload.github.com/tmaiaroto/go-lambda-geoip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaiaroto%2Fgo-lambda-geoip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273067892,"owners_count":25039909,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-lambda","geolocation","golang","maxmind"],"created_at":"2025-09-01T02:44:16.579Z","updated_at":"2025-10-12T06:34:02.355Z","avatar_url":"https://github.com/tmaiaroto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a refactor of an old Go Lambda that creates an API that will return a visitor's geolocation based on IP address.\nIt now uses the Aegis deploy tool and framework, which uses native Go Lambdas now instead of needing a shim.\n\n### Prerequisites\n\n - An AWS account (and configured credentials for CLI)\n - [Maxmind's GeoLite2 City database.](http://dev.maxmind.com/geoip/geoip2/geolite2/)\n - [Aegis](https://github.com/tmaiaroto/aegis) deploy tool and framework\n - [go-bindata](https://github.com/jteeuwen/go-bindata) \n\nThe filename will likely be ```GeoLite2-City.mmdb```.\n\n\n## Instructions\n\nAssuming you have AWS credentials configured and you've got the `aegis` and `go-bindata` binaries\nin your path ready to use. You can run the following to retrieve the geoip data set, build, and deploy:\n\n```\ncurl -o GeoLite2-City.tar.gz http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz\n\ntar -xvf GeoLite2-City.tar.gz\n\nmv GeoLite2-City_20180327/GeoLite2-City.mmdb GeoLite2-City.mmdb\n\ngo-bindata GeoLite2-City.mmdb\n\naegis deploy\n```\n\nIt should build and deploy the Lambda. It may take a little bit due to the size of the database file.\nIt took my 2min 12s to build and deploy (so says my zsh).\n\n------\n\nYou can see the old way we had to use Go in AWS Lambda by looking at the `legacy-shim` branch \n[and here's the original article.](https://medium.com/@shift8creative/go-amazon-lambda-7e95a147cec8#.ab93bgu8s)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmaiaroto%2Fgo-lambda-geoip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmaiaroto%2Fgo-lambda-geoip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmaiaroto%2Fgo-lambda-geoip/lists"}