I would like to wire in a DI container to an AWS lambda function. It would be nice if there were a base class architecture to facilitate SOLID principles in AWS Lambda. Obviously there is no startup.cs class or other .NET Core initialization facilities available.
This approach would allow one to service out the testable pieces of a larger lambda function.
public class Function : Startup
{
private IFooService _fooService;
public Function(IFooService fooService)
{
_fooService = fooService;
}
public SkillResponse FunctionHandler(SkillRequest input, ILambdaContext context)
{
FooBar fooBar = _fooService.GetFooBar();
}
}