Bravin Ninja
Bravin Ninja

Reputation: 133

Deploying existing REST API to AWS lambda written in Java

I have a rest api developed in spring boot. It has many http methods with different endpoints. Now I want to deploy this code to AWS lambda. My current code is designed using Controllers and Request mapping methods. As per AWS lambda, I have to write request handler functions instead of using typical Java request mapping methods. What is the best way to covert the existing rest api to aws lambda function? When I search some articles I am getting only hello world examples with request handler functions. It is not helpful to convert the whole API. Please share some examples and coding standards to write the request handlers. Thanks in advance.

Upvotes: 1

Views: 1852

Answers (1)

Simon Martinelli
Simon Martinelli

Reputation: 36143

There is no out of the box conversion.

But there is a Spring Cloud Project Functions:

https://spring.io/projects/spring-cloud-function

Here you will find the documentation:

https://cloud.spring.io/spring-cloud-function/spring-cloud-function.html

But as I said there is no way to use Controllers because it doesn't make sense to start a whole Spring Boot application as a Function.

Upvotes: 2

Related Questions