lambda-layer-canvas-nodejs published on AWS Serverless Application Repository packages node-canvas and its dependencies as AWS Lambda Layer.
node-canvas is a Cairo backed Canvas implementation for Node.js. It implements the Mozilla Web Canvas API as closely as possible. For the current API compliance, please check Compatibility Status.
The Lambda Layer is built from source of node-canvas npm package on amazonlinux dev container instance, with following native dependencies installed. Please check build-layer.sh
for details.
gcc-c++ cairo-devel pango-devel libjpeg-turbo-devel giflib-devel librsvg2-devel pango-devel bzip2-devel jq python3
Since AWS Lambda is a secure and isolated runtime and execution environment, this layer aims to target AWS Lambda compatible build. As there are canvas libraries and frameworks relying on node-canvas running on Node.js runtime, this layer also tries to include and support these libraries and frameworks.
Fabric.js is a framework that makes it easy to work with HTML5 canvas element. It is an interactive object model on top of canvas element. It is also an SVG-to-canvas (and canvas-to-SVG) parser.
Konva is a framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.
Note: From Canvas Layer v2.9.3 release, since konva-node package is deprecated, konva package is used directly through build script.
To get started, please visit https://github.com/charoitel/lambda-layer-canvas-nodejs/wiki/Getting-Started
Made with ❤️ by Charoite Lee and contributors. Available on the AWS Serverless Application Repository