{"id":21487625,"url":"https://github.com/outofcoffee/lambda-http-gateway","last_synced_at":"2026-04-13T03:12:19.693Z","repository":{"id":76112696,"uuid":"443909492","full_name":"outofcoffee/lambda-http-gateway","owner":"outofcoffee","description":"Simple HTTP Gateway for AWS Lambda functions","archived":false,"fork":false,"pushed_at":"2026-03-22T01:37:10.000Z","size":38,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-22T10:54:56.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/outofcoffee.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-03T01:26:01.000Z","updated_at":"2026-03-21T23:06:30.000Z","dependencies_parsed_at":"2023-03-11T21:31:33.600Z","dependency_job_id":null,"html_url":"https://github.com/outofcoffee/lambda-http-gateway","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/outofcoffee/lambda-http-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outofcoffee%2Flambda-http-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outofcoffee%2Flambda-http-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outofcoffee%2Flambda-http-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outofcoffee%2Flambda-http-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/outofcoffee","download_url":"https://codeload.github.com/outofcoffee/lambda-http-gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outofcoffee%2Flambda-http-gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-23T13:29:52.219Z","updated_at":"2026-04-02T11:38:08.186Z","avatar_url":"https://github.com/outofcoffee.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda HTTP Gateway\n\nSimple HTTP gateway for AWS Lambda. Acts as a lightweight API gateway for AWS Lambda functions.\n\n## Run\n\nYou can download the binary for your platform from the [releases](https://github.com/outofcoffee/lambda-http-gateway/releases) page, or use the [Docker image](#docker-image).\n\n\u003e **Important:** Ensure the relevant AWS credentials are configured before run. The gateway uses the standard AWS mechanisms to authenticate/authorise with the AWS Lambda API, so the usual approaches of profiles/credentials apply.\n\n### Binary\n\n    ./lambdahttpgw\n\n### Docker\n\n    docker run -it -p 8090:8090 outofcoffee/lambdahttpgw\n\n\u003e Note: the home directory for the `gateway` user that runs the binary is `/opt/gateway`\n\n## Call Lambda function\n\nCall the Lambda function via the gateway:\n\n    curl http://localhost:8090/MyLambdaName/some/path\n    ...\n    \u003cLambda HTTP response\u003e\n\n\u003e Note the prefix of the Lambda function name (`MyLambdaName` above), before the path. The function receives the portion of the path without the function name, i.e. `/some/path` in this example.\n\nThe Lambda function receives events in the standard AWS API Gateway JSON format, and is expected to respond in kind.\n\nThe gateway also supports [subdomain-based routing](./docs/routing.md), where the function name is extracted from the `Host` header instead of the path.\n\n## Configuration\n\nEnvironment variables:\n\n| Variable              | Meaning                                                                                         | Default     | Example                            |\n|-----------------------|-------------------------------------------------------------------------------------------------|-------------|------------------------------------|\n| AWS_REGION            | AWS region in which to connect to Lambda functions.                                             | `eu-west-1` | `us-east-1`                        |\n| BASE_DOMAIN           | Base domain for subdomain routing. Required when `ROUTING_MODE=subdomain`.                      | Empty       | `live.mocks.cloud`                 |\n| CORS_PERMISSIVE       | Enable permissive CORS: reflects the request Origin, allows common headers (Accept, Authorization, Content-Type etc.) and credentials. | `false`     | `true`                             |\n| FUNCTION_PREFIX       | Optional prefix prepended to resolved function names before invoking Lambda.                    | Empty       | `imposter-`                        |\n| LOG_LEVEL             | Log level (trace, debug, info, warn, error).                                                    | `debug`     | `warn`                             |\n| PORT                  | Port on which to listen.                                                                        | `8090`      | `8080`                             |\n| REQUEST_ID_HEADER     | Name of request header to use as request ID for logging. If absent, a UUID will be used.        | Empty       | `x-correlation-id`                 |\n| ROUTING_MODE          | Routing mode: `path` extracts function name from URL path, `subdomain` from the Host header.    | `path`      | `subdomain`                        |\n| STATS_RECORDER        | Whether to record number of hits for each function.                                             | `false`     | `true`                             |\n| STATS_REPORT_INTERVAL | The frequency with which stats should be reported, if enabled.                                  | `5s`        | `2m`                               |\n| STATS_REPORT_URL      | URL to which stats should be reported. If not empty, hits are recorded for each function name.  | Empty       | `https://example.com`              |\n\nSee [Routing](./docs/routing.md) for details on path-based vs subdomain-based routing.\n\nSee [CORS](./docs/cors.md) for details on permissive CORS support.\n\n## Build\n\nPrerequisites:\n\n- Go 1.17+\n\nSteps:\n\n    go build\n\n## Docker image\n\nImage on [Docker Hub](https://hub.docker.com/r/outofcoffee/lambdahttpgw):\n\n    outofcoffee/lambdahttpgw\n\n## Stats recording and reporting\n\nThe Gateway can optionally record the number of hits per function and report it to an external hit counter server.\n\n\u003e This behaviour is disabled by default.\n\nSee [Stats recording and reporting](./docs) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutofcoffee%2Flambda-http-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutofcoffee%2Flambda-http-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutofcoffee%2Flambda-http-gateway/lists"}