Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

aws-sdk-2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Java AWS Lambda with Serverless.com Tutorial

In which we build a Expense Service using:

This project aims to show how to deploy a basic API using AWS serverless services, and Serverless Framework to deploy it.

Using CDK

This tutorial still make use of Serverless.com for deployment, but you can view the CDK tutorial for information on using AWS CDK to even implement your infrastructure as code in Java.

Setup

Installation Setup

In order to do this tutorial, you need to install a few things:

  • Install node and npm
  • Install the Serverless Framework installed with an AWS account set up.
  • Install Java 11 JDK (OpenJDK is good)
  • Install Gradle (You can use Maven as well to build your Java artifact.)

Configuration Setup

The Project

A basic API for tracking expenses.

  • We will start with an API that allows to retrieve, create, update and delete expenses.
  • We will then create a second service that listens to these expense events, and keep a list of expense totals per person.

Iterations

  1. Define some domain classes with tests
  2. Implement a basic AWS Lambda function
  3. Implement lambda functions for retrieving expenses
  4. Add an AWS API Gateway endpoint to call the Lambda function and test that via Postman
  5. Create a new API endpoint with Lambda function for creating expenses
  6. Persist the expenses to DynamoDB and change Lambdas to use the persisted data
  7. Create a Lambda function that listens to expense events via AWS Simple Queue Service
  8. (Later) hook up API Gateway endpoint to expense totals lambda