How to create AWS Lambda function using Spring Cloud Function
Channel: Interview DOT
Date: 2019-10-20

Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications.
n this tutorial, we’ll learn how to use Spring Cloud Function.

We'll build and run a simple Spring Cloud Function locally and then deploy it to AWS.

What makes Spring Cloud Function so powerful is that we can build Spring enabled functions that are cloud agnostic. The function itself doesn't need to know about how it was called or the environment it is deployed into. For example, we can easily deploy this greeter to AWS, Azure or Google Cloud platform without changing any of the business logic.

Since AWS Lambda is one of the popular serverless solutions, let's focus on how to deploy our app into it.

Spring Cloud Function is a powerful tool for decoupling the business logic from any specific runtime target.

Spring Cloud Function is a project with the following high-level goals:

Promote the implementation of business logic via functions.

Decouple the development lifecycle of business logic from any specific runtime target so that the same code can run as a web endpoint, a stream processor, or a task.

Support a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS).

Enable Spring Boot features (auto-configuration, dependency injection, metrics) on serverless providers.
Spring Cloud Function features:

Choice of programming styles - reactive, imperative or hybrid.

Function composition and adaptation (e.g., composing imperative functions with reactive).

Support for reactive function with multiple inputs and outputs allowing merging, joining and other complex streaming operation to be handled by functions.

Transparent type conversion of inputs and outputs.

Packaging functions for deployments, specific to the target platform (e.g., Project Riff, AWS Lambda and more)

Adapters to expose function to the outside world as HTTP endpoints etc.

Deploying a JAR file containing such an application context with an isolated classloader, so that you can pack them together in a single JVM.

Compiling strings which are Java function bodies into bytecode, and then turning them into @Beans that can be wrapped as above.

Adapters for AWS Lambda, Microsoft Azure, Apache OpenWhisk and possibly other "serverless" service providers.

code : https://github.com/net-vinothkumar/spring-cloud-function-aws