{"id":19881127,"url":"https://github.com/djhworld/go-lambda-invoke","last_synced_at":"2025-05-02T13:32:35.371Z","repository":{"id":57488522,"uuid":"119099138","full_name":"djhworld/go-lambda-invoke","owner":"djhworld","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-31T10:49:51.000Z","size":9,"stargazers_count":83,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-18T18:46:13.999Z","etag":null,"topics":["aws","aws-lambda","go","golang"],"latest_commit_sha":null,"homepage":null,"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/djhworld.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}},"created_at":"2018-01-26T20:21:09.000Z","updated_at":"2024-01-17T04:22:45.000Z","dependencies_parsed_at":"2022-08-29T15:01:40.234Z","dependency_job_id":null,"html_url":"https://github.com/djhworld/go-lambda-invoke","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djhworld%2Fgo-lambda-invoke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djhworld%2Fgo-lambda-invoke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djhworld%2Fgo-lambda-invoke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djhworld%2Fgo-lambda-invoke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djhworld","download_url":"https://codeload.github.com/djhworld/go-lambda-invoke/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224315220,"owners_count":17290992,"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","aws-lambda","go","golang"],"created_at":"2024-11-12T17:13:21.481Z","updated_at":"2024-11-12T17:13:22.259Z","avatar_url":"https://github.com/djhworld.png","language":"Go","readme":"# go-lambda-invoke\n\nSmall package to allow you to invoke your Go AWS lambda locally.\n\nThis _might_ be useful for:\n\n* You want to run an integration test, maybe in conjunction with [LocalStack](https://github.com/atlassian/localstack)?\n  * Unit testing is probably better in most cases\n* You want to validate your CI has built a valid `linux` binary of your application before deploying\n\nI wrote a blog post about it here https://djhworld.github.io/post/2018/01/27/running-go-aws-lambda-functions-locally/\n\n## Installing\n\n```\ngo get -u github.com/djhworld/go-lambda-invoke/golambdainvoke\n```\n\n## Example usage\n\nRun the example lambda [toupperlambda.go](/toupperlambda.go) on port 8001\n\n```\n_LAMBDA_SERVER_PORT=8001 go run ./toupperlambda.go\n```\n\nThen use this library in tests or wherever you need it, by calling \n\n```\nresponse, err := golambdainvoke.Run(Input{\n    Port:    8001,\n    Payload: \"payload\",\n})\n```\n\nNote that `Payload` can be any structure that can be encoded by the `encoding/json` package. Your lambda function will need to use this structure in its type signature.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjhworld%2Fgo-lambda-invoke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjhworld%2Fgo-lambda-invoke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjhworld%2Fgo-lambda-invoke/lists"}