aws-lambda
AWS Lambda usage example
Based on this article https://www.baeldung.com/java-aws-lambda
Prerequisites
- Maven 3
- JDK 21
How to build
mvn clean install
How to run on AWS
Create Lambda functions:
- MethodHandlerLambda
- RequestHandlerLambda
- StreamHandlerLambda
- SavePersonHandlerLambda
Upload result fat JAR from
folder into each Lambda function
Set appropriate handler in Runtime settings section (on Code tab) of each Lambda function:
- by.andd3dfx.lambda.LambdaMethodHandler::handleRequest
- by.andd3dfx.lambda.LambdaRequestHandler::handleRequest
- by.andd3dfx.lambda.LambdaRequestStreamHandler::handleRequest
- by.andd3dfx.lambda.LambdaSavePersonHandler::handleRequest
Create DynamoDB Table
with Partition key
Created DynamoDB table should be in the same region that declared in
How to check
From Test tab - send test event with some text in quotes
Green section "Execution result: succeeded" should appear. Check logs in it
Языки
Java