Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix stream lambda invocation in aws #21

Open
antonovdmitriy opened this issue Mar 28, 2023 · 1 comment
Open

fix stream lambda invocation in aws #21

antonovdmitriy opened this issue Mar 28, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@antonovdmitriy
Copy link
Owner

Start Class: class org.example.LambdaApplication
16:43:00.804 [main] INFO org.springframework.cloud.function.utils.FunctionClassUtils - Main class: class org.example.LambdaApplication
. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot ::
2023-03-28 16:43:02.122 INFO 8 --- [ main] o.s.c.f.a.aws.CustomRuntimeInitializer : AWS Handler: org.springframework.cloud.function.adapter.aws.FunctionInvoker
2023-03-28 16:43:02.155 INFO 8 --- [ main] lambdainternal.AWSLambda : Starting AWSLambda using Java 11.0.18 on 169.254.205.61 with PID 8 (/var/runtime/lib/aws-lambda-java-runtime-0.2.0.jar started by sbx_user1051 in /var/task)
2023-03-28 16:43:02.156 INFO 8 --- [ main] lambdainternal.AWSLambda : No active profile set, falling back to 1 default profile: "default"
2023-03-28 16:43:03.923 INFO 8 --- [ main] lambdainternal.AWSLambda : Started AWSLambda in 2.86 seconds (JVM running for 3.705)
2023-03-28 16:43:03.999 INFO 8 --- [ main] o.s.c.f.adapter.aws.FunctionInvoker : Locating function: 'streamLambda'
2023-03-28 16:43:04.060 INFO 8 --- [ main] o.s.c.f.adapter.aws.FunctionInvoker : Located function: 'streamLambda'
START RequestId: 84bfb298-67f0-4b44-8122-4f38937bc38f Version: $LATEST
2023-03-28 16:43:04.081 INFO 8 --- [ main] o.s.c.f.adapter.aws.AWSLambdaUtils : Received: {"key1":"value1","key2":"value2","key3":"value3"}
Invoking function: streamLambda<class java.io.InputStream, class java.lang.String>with input type: class java.io.InputStream
argument type mismatch: java.lang.IllegalArgumentException
java.lang.IllegalArgumentException: argument type mismatch
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.cloud.function.context.catalog.BeanFactoryAwareFunctionRegistry$1.invoke(BeanFactoryAwareFunctionRegistry.java:292)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
at org.example.lambda.requestresponse.StreamLambda$$EnhancerBySpringCGLIB$$1723471c.apply()
at org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.invokeFunctionAndEnrichResultIfNecessary(SimpleFunctionRegistry.java:931)
at org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.invokeFunction(SimpleFunctionRegistry.java:886)
at org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.doApply(SimpleFunctionRegistry.java:747)
at org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.apply(SimpleFunctionRegistry.java:590)
at org.springframework.cloud.function.adapter.aws.FunctionInvoker.handleRequest(FunctionInvoker.java:92)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)

END RequestId: 84bfb298-67f0-4b44-8122-4f38937bc38f
REPORT RequestId: 84bfb298-67f0-4b44-8122-4f38937bc38f Duration: 941.43 ms Billed Duration: 942 ms Memory Size: 512 MB Max Memory Used: 147 MB Init Duration: 3872.49 ms

@antonovdmitriy antonovdmitriy added the bug Something isn't working label Mar 28, 2023
@antonovdmitriy antonovdmitriy self-assigned this Mar 28, 2023
@antonovdmitriy antonovdmitriy moved this from Todo to In Progress in learning-lambda-spring-boot Mar 28, 2023
@antonovdmitriy
Copy link
Owner Author

created issue to spring cloud function

@antonovdmitriy antonovdmitriy moved this from In Progress to Todo in learning-lambda-spring-boot Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant