Simple Micronaut Hello World application lambda.
Building Micronaut AWSLambda native executable is quite easy and require 3 steps only:
- Build JAR:
./gradlew micronaut-application-helloworld:shadowJar
- Build native executable via Docker:
docker build -t micronaut-application-helloworld .
- Extract native executable from container:
docker run --rm --entrypoint cat micronaut-application-helloworld /home/application/function.zip > build/function.zip
sam local start-api -t sam.yaml -p 3000
Example of event to send to lambda:
{
"body": "{\"name\":\"Steeven King\"}",
"httpMethod": "POST",
"isBase64Encoded": false,
"path": "/"
}