2021-05-12 01:17:24 +00:00
Invoking other Lambdas from a Lambda is a scalability anti-pattern. As the runtime of your function is bounded, waiting for another Lambda to finish executing could cause a timeout.
2021-05-05 08:56:28 +00:00
2021-05-11 01:20:07 +00:00
2021-05-12 01:17:24 +00:00
Alternative solutions include:
2021-05-11 01:20:07 +00:00
* Generating events that can be consumed asynchronously by other Lambdas
* Making the Lambda invocation asynchronous
2021-05-05 08:56:28 +00:00
2021-05-12 01:17:24 +00:00
== Compliant solution
2021-05-05 08:56:28 +00:00
----
InvokeRequest invokeRequest = new InvokeRequest()
2021-05-12 01:17:24 +00:00
.withFunctionName("myFunction");
2021-05-05 08:56:28 +00:00
2021-05-12 01:17:24 +00:00
AWSLambdaAsync client = AWSLambdaAsyncClientBuilder.defaultClient();
client.invokeAsync(request); // Compliant
----
2021-05-11 01:20:07 +00:00