Sign inSign up

boomfish/lambda-serverless

By boomfish

Updated almost 7 years ago

Serverless Framework in a simulated AWS Lambda execution environment

Image
0

1.2K

boomfish/lambda-serverless repository overview

boomfish/lambda-serverless

Serverless Application Framework AWS Lambda API Gateway

serverless

Docker images for building AWS Lambda functions with native binary dependencies and deploying them using the Serverless Framework.

This image is very large and overkill for many Lambda applications, but is useful if you wish to write functions that use high-performance native libraries such as libvis and wrappers for them such as the Sharp module for NodeJS.

Images are available for the following language runtimes supported in AWS Lambda:

  • Node.js
    • v8.10 (nodejs8.10)
    • v6.10 (nodejs6.10)
  • Python
    • Python 3.6 (python3.6)
    • Python 2.7 (python2.7)
  • Java
    • Java 8 (java8)
  • Go
    • Go 1.x (go1.x)

Usage

Build Locally

If you want to build and use your own local image

# build image locally for Node.JS v8.10
$ make build LANG=nodejs8.10
# go inside a container instance for the local Node.JS v8.10 image
$ make shell LANG=nodejs8.10

Example

example/apigw is an example on how to use boomfish/lambda-serverless.

Update Docker image

New version of Serverless Framework
  1. Change SERVERLESS in the Dockerfile for the language runtime you wish to test
  2. Build and test locally (test also the apigw example)
  3. Make similar changes to the Dockerfiles of the other language runtimes (if applicable)
  4. Commit and push the changes to master
  5. Push the corresponding branch for the runtime with command $ make push LANG={lang}
  6. Go to hub.docker.com
  7. In Build Details tab, you should now see the build for the runtime tag kicking off
  8. Repeat 1-8 for any other language runtimes you wish to test
Fix for the current version
  1. Do the fixes you want to do $ make push LANG={lang}
  2. Build and test locally (test also the apigw example)
  3. Make similar changes to the Dockerfiles of the other language runtimes (if applicable)
  4. Commit and push the changes
  5. Run $ make push LANG={lang}
  6. Go to hub.docker.com
  7. In Build Details tab, you should now see the build for the runtime tag kicking off
  8. Repeat 1-8 for any other language runtimes you wish to test

Docker image

The images use build images from lambci/lambda for their base so that deployment packages built in it will be highly compatible with the Lambda execution environment. According to the maintainers, the base images include the following packages:

  • aws-cli
  • zip
  • git
  • vim
  • docker (Docker in Docker!)
  • gcc-c++
  • clang
  • openssl-devel
  • cmake
  • autoconf
  • automake
  • libtool
  • xz-libs
  • libffi-devel
  • python27-devel
  • libmpc-devel
  • mpfr-devel
  • gmp-devel

These image also add the following:

Tag summary

Content type

Image

Digest

Size

652 MB

Last updated

almost 7 years ago

docker pull boomfish/lambda-serverless:nodejs8.10