Micronaut function lambda for DynamoDB.
Building Micronaut AWSLambda native executable is quite easy and require 3 steps only:
- Build JAR:
./gradlew micronaut-function-dynamodb:shadowJar
- Build native executable via Docker:
docker build -t micronaut-function-dynamodb .
- Extract native executable from container:
docker run --rm --entrypoint cat micronaut-function-dynamodb /home/application/function.zip > build/function.zip
You can run AWS emulator (SAM) locally to emulate and test deployment like it is AWS Lambda Cloud.
sam local start-api -t sam.yaml -p 3000
Example of event to send to lambda:
{
"name": "Steeven King"
}