All Projects → jasonmoo → Lambda_proc

jasonmoo / Lambda_proc

Running a companion process to an AWS Lambda function in go

Programming Languages

go
31211 projects - #10 most used programming language

lambda_proc

This is experimental and passes tests but should be considered experimental.

Leverages container reuse in aws lambda by starting go proc as companion process, communicating via stdin/stdout with parent nodejs process. Run takes a handler function and runs it once per json payload received from the parent nodejs process. Lambda containers may be frozen and thawed between invocations. This allows a go proc to live for many requests, allowing memoization, startup cost elimination, and performance benefits. Observed lambda run times between .5ms-15ms after first invocation.

index.js has much more robust error handling than typical examples and will restart the go companion process when it dies, syscall writes to it fail, or other error scenarios.

the example folder build.sh script and code are all complete examples of a working lambda.

License: MIT 2015

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].