Skip to content

Files

Latest commit

 

History

History

micronaut-application-helloworld

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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