cjkent / osiris

Simple Serverless Web Apps in Kotlin
Apache License 2.0
39 stars 2 forks source link

Abstraction for lambdas #66

Open cjkent opened 6 years ago

cjkent commented 6 years ago

A wrapper around a lambda that can be invoked directly or asynchronously via a send() method.

AWS implementation that is initialised with an environment var containing the ARN to the lambda.

In-memory implementation that just wraps the function directly.

The components provider can define an abstract property for the function and there can be different implementations for local testing and deployment to AWS.

cjkent commented 6 years ago

This would be particularly useful for endpoints that need to start an async calculation and return a response to the caller while the calculation is still ongoing. The obvious way to do this is to make an async call to another lambda. But that is painful using the lambda SDK.