Why is this an issue?
Invoking other Lambdas synchronously from a Lambda is a scalability anti-pattern. Lambdas have a maximum execution time before they timeout (15
minutes as of May 2021). Having to wait for another Lambda to finish its execution could lead to a timeout.
A better solution is to generate events that can be consumed asynchronously by other Lambdas.
Noncompliant code example
With AWS SDKv1
InvokeRequest invokeRequest = new InvokeRequest()
AWSLambda awsLambda = AWSLambdaClientBuilder.standard()
awsLambda.invoke(invokeRequest); // Noncompliant