You can implement an AWS Lambda runtime in any programming language. A runtime is a program that runs a Lambda function’s handler method when the function is invoked. You can include a runtime in your function’s deployment package in the form of an executable file named bootstrap.
As defined by Amazon itself in the docs.
Luckily I found a Github repo, that contains all stuff to add lilypond to the runtime: LilyBin-github. It looked a bit abandoned though, so time to dive in and try to learn enough about custom runtime’s in the process.
The github repo contains scripts to download a lilypond binary and add it with some lilypond fonts to the runtime. It also contains scripts to administer a new Amazon Lambda function.
The script in tools/ and deploy/ contained some hard coded stuff. I uses a hardcoded IAM role, so I created a fresh one that could be used to create Lambda functions via the IAM portal, Roles etc.
I also updated the aws package and edited the .babelrc file to set the project to a node10 compliant babel preset.
After fiddling around in update.sh, untar.sh and create.sh I got a working build with:
That created a new AWS Lambda function that I could inspect in the Amazon Lambda Gateway. Cool!
But, of course, it had errors as the stuff is older then 2 years, which is an era in jscript country. So I went ahead and applied the outstanding PR, deleted the function and ran the create.sh script again. More luck this time as I now could see
Which indicated that I had a problem with the lilypond binary, but that the rest of the AWS lambda function, including the jscript part that does the console logging, just worked fine.