aws / aws/aws-lambda-go

Allow multiple handlers in the same binary

Open
#182 8 comments 42 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
3.8k
Forks
578
Avg merge
8h 18m
Merged PRs (30d)
1

Description

For other languages on Lambda, a single deployment artifact (JAR or zip file) can have multiple handlers functions in them. Multiple Lambda functions can use the same deployment artifact, with different behavior based on the handler selected in the Lambda function configuration. For Go, this isn't possible. `lambda.Start(handler interface{})` takes a single function. This means a separate binary has to be built for every function, and since Go builds are statically linked, there's no speedup when functions share code. This has caused users create custom build systems [like Fender has](https://medium.com/fender-engineering/building-automating-and-deploying-serverless-microservice-infrastructures-53bd4ca6faf1) to parallelize their builds.

This would be in concert with the Lambda service supporting handler function specification for Go functions in the API.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.