My goal is to Trigger a lambda from another lambda, and I am getting stuck because the 2nd lambda never gets started.
public async Task<bool> CallLambda(string functionName)
{
var request = new InvokeRequest
{
FunctionName = functionName + ":" + LAMBDA_ENVIROMENT,
InvocationType = InvocationType.RequestResponse,
Payload = ""
};
LambdaLogger.Log("Trigger lambda " + request.FunctionName);
var lambdaClient = new AmazonLambdaClient();
await lambdaClient.InvokeAsync(request);
LambdaLogger.Log("Trigger Done ");
return true;
}
And here is the Lambda function that needs to be triggered
public const string NAME = LAMBDA_BASENAME + "DeleteHandler";
[Cloudformation4dotNET.Lambda.LambdaResourceProperties(TimeoutInSeconds = 900)]
public void DeleteHandler()
{
Logger.Log(string.Format("Data from the model " + AnaplanIDs.modelId + "has been deleted"));
...
}
When executing the 1rst lambda, the output I am getting is:

We can see that it calls the correct lambda name, and it never prints the LambdaLogger.Log("Trigger Done "); and the DeleteHandler never get started
var functionToCall = $"{functionName}:{LAMBDA_ENVIROMENT}";you should then log that value.InvocationType.RequestResponsetoInvocationType.Eventalso your function method, try changing it toasync Taskinstead ofvoid.