GH-1082 Ensure AWS events are not post-processed

Resolves #1082
This commit is contained in:
Oleg Zhurakousky
2023-10-18 15:23:32 +02:00
parent 7797471097
commit 71ee83ef4b

View File

@@ -201,10 +201,7 @@ public final class AWSLambdaUtils {
Class<?> outputClass = FunctionTypeUtils.getRawType(functionOutputType);
if (outputClass != null) {
String outputClassName = outputClass.getName();
if (outputClassName.equals("com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse") ||
outputClassName.equals("com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent") ||
outputClassName.equals("com.amazonaws.services.lambda.runtime.events.ApplicationLoadBalancerResponseEvent") ||
outputClassName.equals("com.amazonaws.services.lambda.runtime.events.IamPolicyResponse")) {
if (outputClassName.startsWith("com.amazonaws.services.lambda.runtime.events.")) {
return extractPayload((Message<Object>) responseMessage, objectMapper);
}
}