A Serverless v1.x plugin to build Go binaries for AWS Lambda functions. Version 0.0.6 is the latest release as of the provided data. The plugin integrates with the Serverless Framework (v1.x) to automate building of Go code, allowing developers to specify .go files or module.Function as handlers in serverless.yml. Key differentiators: automatically builds all Go functions listed as handlers, supports individual packaging for reduced Lambda code size, runs Go tests with optional serverless plugin hooks, and is highly customizable via serverless.yml. It is less actively maintained compared to alternatives like serverless-go-plugin.
npm install serverless-go-buildVerified import paths — ran on the pinned version, not inferred.
Install plugin, configure serverless.yml with Go handler, create main.go Lambda function, build and deploy.
Use alternative plugin or stay on Serverless v1.x.
Run `serverless build` prior to `serverless deploy` or configure a deploy hook.
Override awsbuildPrefix with a safer value like `GOOS=linux` (without trailing space) or set it to empty string.
Check generatedEntrypoints directory and ensure module path is correct in custom.go-build.pathToAWSLambda.
Manually create the `generatedEntrypoints` directory in your project root, or change the path via `custom.go-build.generatedMainPath`.
Ensure the handler value points to an existing .go file (e.g., `main.go`) or a module function (e.g., `packageName.FunctionName`) with a generated main.go.
Check your Go files for syntax errors and verify `custom.go-build.buildCmd` and `custom.go-build.awsbuildPrefix` are correct for your environment.