The application is a CRUD API with Lambda handlers implemented using Java. Its architecture is in the picture given below.
- Java 11 (Amazon Corretto)
- Apache Maven
- AWS SAM CLI
The Lambda Handlers implement the Amazon API Gateway payload format version 2.0. It is a requirement for invocation of the functions by URL as described in AWS Lambda Developer guide.
sam build
sam local invoke
To add more service clients, you need to add the specific services modules in pom.xml
and create the clients in DependencyFactory
following the same
pattern as dynamoDbClient.
The project contains a SAM template file template.yaml
where you can
configure different properties of lambda functions such as memory size and timeout. You might also need to add specific policies to the lambda function
so that it can access other AWS resources.
To deploy the application, you can run the following command:
sam deploy --guided
See Deploying Serverless Applications for more info.