Exploring the Code
Quick Start Guide
This is the second of four Quick Start Guides for the Java Serverless code variant. This document outlines the folder contents for each of the three repositories that you previously cloned on your workstation. If you haven't taken that step, follow the "Getting the Code" link at the bottom of this page.
The Serverless Repository
The serverless repository contains the Java code for Lambdas, along with artifacts and scripts used for deployments to AWS. Here's a quick tour of the folders you'll see in this repository.
/.vscode
Task and settings files to assist development with VS Code.
/buildspec
AWS CodeProject buildspec files for the two deployment options. These files are used by the demonstration pipeline that's described below.
/deployment
Parent for the two sets of deployment folders, each containing command-line scripts for zsh and PowerShell, as well as CloudFormation templates and where applicable, OpenAPI documents. Individual deployment folders are listed below.
/deployment/openapi
Contains the deployment files for the OpenAPI-defined version of the solution.
/deployment/sam
Contains the deployment files for the basic serverless-application-model version of the solution.
/main
The parent folder for the java source code which is structured as a multi-module maven project, although in this case it contains only one.
/main/lambda
Contains the Lambdas that back the APIs for the SAM and OpenAPI deployments of the sample code.
/pipeline
Contains scripts (zsh and PowerShell versions) and a CloudFormation template that defines a CodePipeline process for the sample code.
The Core Repository
The core repository contains the code for shared data classes, utilities, and service components that are called by the Lambdas found in the serverless repository. Here's a summary of the folders you'll see in this repository.
/.vscode
This folder contains launch, task and settings files to assist development with VS Code.
/main
The parent folder for the java source code which is structured as a multi-module maven project.
/main/services
Contains the implementations for the service components that are invoked by the Lambdas.
/main/shared
Contains the classes for the API inputs/outputs and the service interfaces for the solution.
/main/test
Contains example mock and stub service implementations for potential use in component tests.
/main/tools
Contains command-line tools that can be used to seed performance-testing data in the database.
The Common Repository
The common repository contains artifacts that are used by all AWS-based variants of the solution. Here's an outline of the folders found in this repository.
/buildspec
This is a common AWS CodeBuild buildspec file that is used to perform automated API tests for the solution within a build pipeline.
/postman
This folder contains functional- and performance-oriented test collection files that can be imported into a workspace in Postman for API testing of the solution.
/scripts
These are zsh and PowerShell example scripts that are used in the labs for the Learning AWS Serverless course.