-
Notifications
You must be signed in to change notification settings - Fork 491
Description
You can definitely achieve multiple lambda functions from one code base using the Lambda Bootstrapper and the custom runtime feature.
I have a suite of 16 lambdas that are deployed from one application, rather than a “monolith”.
This is achieved by using the
_handler
environment variable to pick the method to use at runtime, rather than the hard-coded one-to-one mapping shown in the blog post’s sample code.I think of it as a console app which receives a switch that tells it what action to “become” when started up.
I'm having some trouble pulling this off based on your explanation. I have about 20 Lambda functions in my Functions.cs that are tied to corresponding definitions in my serverless.template. I understand you would be passing an environment variable with each definition to indicate which function to call. Most of these functions are of the signature:
public APIGatewayProxyResponse ThisLambdaFunction(APIGatewayProxyRequest request, ILambdaContext context)
{
How do add support for different lambda function signatures, if I have other functions that take different arguments (other than APIGatewayProxyRequest ) and different return types ?
Originally posted by @antsaia in #554 (comment)