Skip to content

Build Lambda Custom Runtime using docker interactively

License

Notifications You must be signed in to change notification settings

refunc/lambda-runtimes

Repository files navigation

Lambda Runtimes

Lambda Runtime images and Xenvs for Refunc

How it works

We use aws lambda runtime interface client for each runtime, eg aws-lambda-python-runtime-interface-client, and convert it's runtime to aws cunstom runtime in order to run lambda on refunc.

Supported runtimes

  • python3.7
  • python3.8
  • python3.9
  • nodejs12.x
  • golang1.17

Dev in local docker without a k8s cluster

main.go is a code runner that implements a stdin/stdout sidecar to hosts a AWS lambda custom runtime

The runner will setup and exec bootstrap for a given runtime, it reads json string from stdin and forward to function and print output to stdout

When creating a new runtime, we can start a container and using runner to debug, for details plz check Makefile

Artifacts

We leverage docker's auto builds to create images for our ported runtimes, new image will name under refunc/lambda:${runtime_name}

License

Copyright (c) 2018 refunc.io

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.