{"id":15728811,"url":"https://github.com/tiagostutz/http-lambda-bridge","last_synced_at":"2026-03-10T03:33:46.492Z","repository":{"id":136404369,"uuid":"377666964","full_name":"tiagostutz/http-lambda-bridge","owner":"tiagostutz","description":"Easily convert any Restful HTTP Service into a Lambda application","archived":false,"fork":false,"pushed_at":"2022-02-19T14:51:26.000Z","size":38,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-03T12:59:19.584Z","etag":null,"topics":["aws","golang","http","lambda","restful"],"latest_commit_sha":null,"homepage":"","language":"Go","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/tiagostutz.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-17T01:03:46.000Z","updated_at":"2023-12-05T10:32:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6e5afab-ecd5-435a-a5d3-7aa5984979f4","html_url":"https://github.com/tiagostutz/http-lambda-bridge","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"01dbb340422b0ab7b40a68f094aea187b8c897ea"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tiagostutz/http-lambda-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagostutz%2Fhttp-lambda-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagostutz%2Fhttp-lambda-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagostutz%2Fhttp-lambda-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagostutz%2Fhttp-lambda-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiagostutz","download_url":"https://codeload.github.com/tiagostutz/http-lambda-bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagostutz%2Fhttp-lambda-bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30323203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"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","golang","http","lambda","restful"],"created_at":"2024-10-03T23:06:31.453Z","updated_at":"2026-03-10T03:33:46.474Z","avatar_url":"https://github.com/tiagostutz.png","language":"Go","readme":"# HTTP Lambda Bridge\n\nEasily convert any HTTP Rest service into a Lambda application\n\nIf you plan to migrate your monolith to AWS Lambda Functions, but can't wait until all the functions are ready to be deployed to have the benefits of the Lambda platform, this bridge is for you!\n\n## Getting Started\n\nYou can check the [demo](demo) folder for a complete example on how to host a [json-server](https://www.npmjs.com/package/json-server) as a lambda function.\n\n## Serving your Docker Restful API monolith as an AWS Lambda \n\nFirst, create an `startup.sh` file that starts the lambda bridge in background and your HTTP Rest service as the main process of the image. Like this:\n```bash\n#!/bin/sh\n\n# start the lambda bridge in background\necho 'Starting /bin/http-lambda-bridge in background'\nnohup /bin/http-lambda-bridge --logLevel=\"$LOG_LEVEL\" --proxyPass=\"$PROXY_PASS\" --httpServiceInitTimeout=$HTTP_SERVICE_INIT_TIMEOUT  \u0026 # start the http service\n\necho 'Starting HTTP service as the main process'\n\n##############################################################\n## change the above lines with your service startup command ##\n##############################################################\necho 'starting HTTP Rest service in foreground'\n# YOUR STARTUP COMMANDO HERE, LIKE `npm start` or `./my-go-service`\n```\n\nSecond, build your Dockerfile like this:\n\n```Dockerfile\nFROM tiagostutz/http-lambda-bridge:0.1.8 AS BRIDGE\n\n### Your original Dockerfile from here... ###\n#############################################\n\n# ...\n\n#################################################\n### ...until here, without the ENTRYPOINT or CMD ###\n\n# copy the bridge executable\nCOPY --from=BRIDGE /bin/http-lambda-bridge /bin/http-lambda-bridge\n\n# ADD the startup entrypoint script having your http service running in background\n# and the bridge executable running in foreground\nADD startup.sh /startup.sh\n\nRUN chmod +x /startup.sh\n\nENTRYPOINT [\"/startup.sh\"]\n\n```\n\nAfter building and deploying your function (see [build-deploy-aws-lambda.sh](demo/build-deploy-aws-lambda.sh) in the demo) go ahead and `curl` your HTTP function address to see.\n\n### Environment Variables\n\n- LOG_LEVEL: trace | debug | info | warning | error | panic\n- PROXY_PASS: local endpoint of the HTTP Rest service bridging to\n- PROXY_METHOD: method to use in the request to proxy. GET | POST  \n- HTTP_SERVICE_INIT_TIMEOUT: maximum timeout to wait for the HTTP Rest service to be up and running\n\n\n## Important note!\n\nIn order for the bridge to receive the complete request path from the API Gateway, you need to override the PayloadFormatVersion of the APIGateway like this:\n\n```yaml\n\n  HttpAPIGatewayOverrides:\n    Type: AWS::ApiGatewayV2::ApiGatewayManagedOverrides\n    Properties: \n      ApiId: !Ref HttpAPIGateway\n      Integration: \n        PayloadFormatVersion: 1.0\n    ...\n```\n\nCheck the [cf-api-lambda.yml](demo/cf-api-lambda.yml) for more details\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagostutz%2Fhttp-lambda-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiagostutz%2Fhttp-lambda-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagostutz%2Fhttp-lambda-bridge/lists"}