1

I have a Spring Boot application that starts without problem when executed locally. I want to run the app via AWS Lambda. I used the https://github.com/awslabs/aws-serverless-java-container and added the corresponding code as described in this sample: https://keyholesoftware.com/2018/04/26/aws-lambda-with-spring-boot/ .

The Problem is, that it throws an exception that it cannot find the Context, when run as Lambda in the AWS:

Caused by: java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:84)
at com.amazonaws.serverless.proxy.spring.SpringBootLambdaContainerHandler.initialize(SpringBootLambdaContainerHandler.java:181)
at com.amazonaws.serverless.proxy.spring.SpringBootLambdaContainerHandler.getAwsProxyHandler(SpringBootLambdaContainerHandler.java:77)
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.