spring-native icon indicating copy to clipboard operation
spring-native copied to clipboard

Unable to invoke `cloud-function-aws` sample on AWS Lambda

Open samuel-bach opened this issue 4 years ago • 3 comments

I built and deployed the sample cloud-function-aws to AWS but are not able to call it. I set the handler in AWS Console to org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest according to cloud-function docs but only get this output when invoking the Lambda:

:: Spring Boot :: (v2.5.3)
[ main] com.example.demo.DemoApplication : Starting DemoApplication v0.0.1-SNAPSHOT using Java 11.0.10 on 169.254.24.205 with PID 9 (/var/task/cloud-function-aws started by sbx_user1051 in /var/task)
[ main] com.example.demo.DemoApplication : No active profile set, falling back to default profiles: default
[ main] o.s.c.f.web.source.SupplierExporter : Starting
[ main] o.s.c.f.c.c.SimpleFunctionRegistry : Failed to locate function: origin\|org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest
[ main] o.s.c.f.web.source.SupplierExporter : No such Supplier: origin\|org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest
[ main] com.example.demo.DemoApplication : Started DemoApplication in 0.17 seconds (JVM running for 0.317)
Started

Do I need to provide a different handler when using spring-native?

samuel-bach avatar Jul 29 '21 10:07 samuel-bach

@dsyer Could you please have a look to this issue?

sdeleuze avatar Jul 29 '21 12:07 sdeleuze

I've just pulled the sample project down and built it locally. I created a template file to test it via AWS SAM and and it throws up an error

Web server failed to start. Port 8080 was already in use.

I don't know if this error is related or not, but the sample cloud-function-aws project does not appear to work either way.

CynanX avatar Mar 10 '22 15:03 CynanX

@olegz Please qualify this one.

sdeleuze avatar Mar 15 '22 09:03 sdeleuze

Could you please try this with Spring Boot 3 and the new Cloud release (will be released 2022-12-14 according to https://calendar.spring.io/) and report an issue if this still doesn't work? Thanks!

mhalbritter avatar Nov 28 '22 10:11 mhalbritter