Prerequisites
- Install the Serverless Framework installed with an AWS account set up.
- Install JDK and not Java JRE. Set your JAVA_HOME.
- Install Apache Maven.
- Create a free Serverless Redis database from Upstash as described here.
Project Setup
Create the project:jedis as dependency to the pom.xml:
pom.xml
serverless.yml as below:
serverless.yml
Counter Function Setup
Updatesrc/main/java/com/serverless/Handler.java as below:
src/main/java/com/serverless/Handler.java