AWS Lambda lets you run code without provisioning. https://aws.amazon.com/lambda/
In the sample application, we are receiving sample request ({"name" : "Sagar"}) in src/test/resources/test.json and sending "hello ${name}"
SAM : Serverless Application Model https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html
- Install aws cli https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
- Install aws SAM https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html
I used pip to install both aws cli and sam.
mvn package
Debugging with Editor : Using Intellij Community edition, remote debugging should work all modern IDE
mvn clean package && sam local invoke -d 5858 --event src/test/resources/test.json
Intellij -> Run/debug Configurations -> Add new configuration -> Click on "Remote" option -> Give a name something "aws-sam-lambda" and port 5858(same port which you provided in previous command)
Set a debug point and Run the application in debug mode.
mvn clean package && sam local invoke --event src/test/resources/test.json
Note : SAM uses template and creates environment by using docker lambcli/java8 container.