{"id":13425066,"url":"https://github.com/aws/aws-lambda-go","last_synced_at":"2025-09-09T20:42:58.091Z","repository":{"id":38983199,"uuid":"107600830","full_name":"aws/aws-lambda-go","owner":"aws","description":"Libraries, samples and tools to help Go developers develop AWS Lambda functions.","archived":false,"fork":false,"pushed_at":"2025-07-30T13:15:34.000Z","size":604,"stargazers_count":3755,"open_issues_count":114,"forks_count":569,"subscribers_count":64,"default_branch":"main","last_synced_at":"2025-09-02T04:03:55.374Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.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,"zenodo":null}},"created_at":"2017-10-19T21:31:24.000Z","updated_at":"2025-08-27T12:14:31.000Z","dependencies_parsed_at":"2023-02-08T13:31:50.058Z","dependency_job_id":"6cf8259a-985d-47b8-87fb-2023bb1410f2","html_url":"https://github.com/aws/aws-lambda-go","commit_stats":{"total_commits":317,"total_committers":147,"mean_commits":"2.1564625850340136","dds":0.7981072555205048,"last_synced_commit":"8e674dad171cebefc4819d785251a76334827bb2"},"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/aws/aws-lambda-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-lambda-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-lambda-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-lambda-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-lambda-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/aws-lambda-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-lambda-go/sbom","scorecard":{"id":219412,"data":{"date":"2025-08-11","repo":{"name":"github.com/aws/aws-lambda-go","commit":"42a01a9d1f01a6218e10ab874fa50ed1a3dc0ef9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.1,"checks":[{"name":"Code-Review","score":6,"reason":"Found 19/30 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":5,"reason":"4 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/build-lambda-zip.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: topLevel 'pull-requests' permission set to 'read': .github/workflows/lint.yml:10","Warn: topLevel 'checks' permission set to 'write': .github/workflows/lint.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/lint.yml:8","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-lambda-zip.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/build-lambda-zip.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/lint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/aws/aws-lambda-go/tests.yml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/build-lambda-zip.yml:29","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/aws/.github/SECURITY.md:1","Info: Found linked content: github.com/aws/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/aws/.github/SECURITY.md:1","Info: Found text in security policy: github.com/aws/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T02:12:01.800Z","repository_id":38983199,"created_at":"2025-08-17T02:12:01.800Z","updated_at":"2025-08-17T02:12:01.800Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273715714,"owners_count":25155105,"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-05T02:00:09.113Z","response_time":402,"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":[],"created_at":"2024-07-31T00:01:03.762Z","updated_at":"2025-09-09T20:42:58.063Z","avatar_url":"https://github.com/aws.png","language":"Go","funding_links":[],"categories":["Go","Misc","Open Source Repos","[AWS Lambda](https://aws.amazon.com/lambda/)"],"sub_categories":["Lambda","Tools and Frameworks"],"readme":"# AWS Lambda for Go \n\n[![tests][1]][2]\n[![build-lambda-zip][3]][4]\n[![Go Reference][5]][6]\n[![GoCard][7]][8]\n[![codecov][9]][10]\n\n[1]: https://github.com/aws/aws-lambda-go/workflows/tests/badge.svg\n[2]: https://github.com/aws/aws-lambda-go/actions?query=workflow%3Atests\n[3]: https://github.com/aws/aws-lambda-go/workflows/go%20get%20build-lambda-zip/badge.svg\n[4]: https://github.com/aws/aws-lambda-go/actions?query=workflow%3A%22go+get+build-lambda-zip%22\n[5]: https://pkg.go.dev/badge/github.com/aws/aws-lambda-go.svg\n[6]: https://pkg.go.dev/github.com/aws/aws-lambda-go\n[7]: https://goreportcard.com/badge/github.com/aws/aws-lambda-go\n[8]: https://goreportcard.com/report/github.com/aws/aws-lambda-go\n[9]: https://codecov.io/gh/aws/aws-lambda-go/branch/master/graph/badge.svg\n[10]: https://codecov.io/gh/aws/aws-lambda-go\n\nLibraries, samples, and tools to help Go developers develop AWS Lambda functions.\n\nTo learn more about writing AWS Lambda functions in Go, go to [the official documentation](https://docs.aws.amazon.com/lambda/latest/dg/go-programming-model.html)\n\n# Getting Started\n\n``` Go\n// main.go\npackage main\n\nimport (\n\t\"github.com/aws/aws-lambda-go/lambda\"\n)\n\nfunc hello() (string, error) {\n\treturn \"Hello λ!\", nil\n}\n\nfunc main() {\n\t// Make the handler available for Remote Procedure Call by AWS Lambda\n\tlambda.Start(hello)\n}\n```\n\n# Building your function\n\nPreparing a binary to deploy to AWS Lambda requires that it is compiled for Linux and placed into a .zip file. When using the `provided`, `provided.al2`, or `provided.al2023` runtime, the executable within the .zip file should be named `bootstrap`. Lambda's default architecture is `x86_64`, so when cross compiling from a non-x86 environment, the executable should be built with `GOARCH=amd64`. Likewise, if the Lambda function will be [configured to use ARM](https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html), the executable should built with `GOARCH=arm64`.\n\n``` shell\nGOOS=linux GOARCH=amd64 go build -o bootstrap main.go\nzip lambda-handler.zip bootstrap\n```\n\n## For developers on Linux\n\nOn Linux, the Go compiler's default behavior is to link the output executable to the system libc for some standard library functionality (for example, DNS lookups). If the build environment is using a Linux distribution with a GNU libc version newer than the deployment environment, the application when deployed to Lambda may fail with an error like ``/lib64/libc.so.6: version `GLIBC_X.YZ' not found``. \n\nMost Go applications do not require linking to the system libc. This behavior can be disabled by using the `CGO_ENABLED` environment variable.\n\n```\nCGO_ENABLED=0 go build -o bootstrap main.go\nzip lambda-handler.zip bootstrap\n```\n\nSee [Using CGO](#using-cgo)\n\n## For developers on Windows\n\nWindows developers may have trouble producing a zip file that marks the binary as executable on Linux. To create a .zip that will work on AWS Lambda, the `build-lambda-zip` tool may be helpful.\n\nGet the tool\n``` shell\ngo.exe install github.com/aws/aws-lambda-go/cmd/build-lambda-zip@latest\n```\n\nUse the tool from your `GOPATH`. If you have a default installation of Go, the tool will be in `%USERPROFILE%\\Go\\bin`. \n\nin cmd.exe:\n``` bat\nset GOOS=linux\nset GOARCH=amd64\nset CGO_ENABLED=0\ngo build -o bootstrap main.go\n%USERPROFILE%\\Go\\bin\\build-lambda-zip.exe -o lambda-handler.zip bootstrap\n```\n\nin Powershell:\n``` posh\n$env:GOOS = \"linux\"\n$env:GOARCH = \"amd64\"\n$env:CGO_ENABLED = \"0\"\ngo build -o bootstrap main.go\n~\\Go\\Bin\\build-lambda-zip.exe -o lambda-handler.zip bootstrap\n```\n\n## Using CGO\n\nFor applications that require CGO, the build environment must be using a GNU libc version installed compatible with the target Lambda runtime. Otherwise, execution may fail with errors like ``/lib64/libc.so.6: version `GLIBC_X.YZ' not found``.\n\n| Lambda runtime  | GLIBC version\n| ----- | ---\n| `provided.al2023` | 2.34\n| `provided.al2` | 2.26\n| `provided` and `go1.x` | 2.17\n\n\nAlternatively, Lambda supports container images as a deployment package alternative to .zip files. For more information, refer to the official documentation for [working with with container images](https://docs.aws.amazon.com/lambda/latest/dg/images-create.html).\n\n# Deploying your functions\n\nTo deploy your function, refer to the official documentation for [deploying using the AWS CLI, AWS Cloudformation, and AWS SAM](https://docs.aws.amazon.com/lambda/latest/dg/deploying-lambda-apps.html).\n\n# Event Integrations\n\nThe [event models](https://github.com/aws/aws-lambda-go/tree/master/events) can be used to model AWS event sources. The official documentation has [detailed walkthroughs](https://docs.aws.amazon.com/lambda/latest/dg/use-cases.html).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Faws-lambda-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Faws-lambda-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Faws-lambda-go/lists"}