From 3968e370dd6430ff014abf8a30e3d5b954445398 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Thu, 24 Oct 2024 14:23:08 +0200 Subject: [PATCH] GH-1187 Add log for AWS Context --- .../cloud/function/adapter/aws/FunctionInvoker.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/src/main/java/org/springframework/cloud/function/adapter/aws/FunctionInvoker.java b/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/src/main/java/org/springframework/cloud/function/adapter/aws/FunctionInvoker.java index 93bfde19d..dfbc067c7 100644 --- a/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/src/main/java/org/springframework/cloud/function/adapter/aws/FunctionInvoker.java +++ b/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/src/main/java/org/springframework/cloud/function/adapter/aws/FunctionInvoker.java @@ -85,6 +85,9 @@ public void handleRequest(InputStream input, OutputStream output, Context contex if (!this.started) { this.start(); } + if (context == null) { + logger.warn("Lambda is invoked with null Context"); + } Message requestMessage = AWSLambdaUtils .generateMessage(input, this.function.getInputType(), this.function.isSupplier(), jsonMapper, context);