Lambda Annotations override startup

31 Views Asked by At

I have a .net core aws lambda application with multiple functions based on LambdaAnnotations lib. Everything went well while all functions shared the same set of types. But now I need to override couple types for certain function. Is there a way to override startup somehow? I tried to inherit the function class from Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction and override like this:

protected override void Init(IWebHostBuilder builder)
{
    builder.UseStartup<Startup2>();
}

but no luck, the previous type is still being resolved. So I'm kind of stuck here, would appreciate any advices (except of creating separate project, I can't do this by requirements). Thanks in advance

0

There are 0 best solutions below