Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1015 Bytes

File metadata and controls

45 lines (34 loc) · 1015 Bytes

Micronaut AWSLambda HelloWorld

Simple Micronaut Hello World application lambda.

Build

Building Micronaut AWSLambda native executable is quite easy and require 3 steps only:

  1. Build JAR:
./gradlew micronaut-application-helloworld:shadowJar
  1. Build native executable via Docker:
docker build -t micronaut-application-helloworld .
  1. Extract native executable from container:
docker run --rm --entrypoint cat micronaut-application-helloworld /home/application/function.zip > build/function.zip

SAM

sam local start-api -t sam.yaml -p 3000

Event Example

Example of event to send to lambda:

{
  "body": "{\"name\":\"Steeven King\"}",
  "httpMethod": "POST",
  "isBase64Encoded": false,
  "path": "/"
}

More