A custom runtime for AWS Lambda to execute functions in Nim Script
Save as index.nims
:
import json
proc handler* = async(event, context): JsonNode {.async.} =
%* "Hi from Nims on Lambda!"
Then bundle up into a zipfile – this is your function bundle:
zip -yr lambda.zip index.nims
Create a new Lambda function and choose the custom runtime option.
Select your lambda.zip
as the "Function code" and make the handler "index.handler".
Then click on Layers and choose "Add a layer"