Canvas Layer for AWS Lambda is published and available on AWS Serverless Application Repository, and GitHub at charoitel/lambda-layer-canvas-nodejs. The layer aims to provide a Cairo backed Mozilla Web Canvas API implementation layer for AWS Lambda, powered by node-canvas.
node-canvas is a Cairo backed Canvas implementation for Node.js. It implements the Mozilla Web Canvas API as closely as possible. For the latest API compliance, you may check Compatibility Status.
The layer is built from source of node-canvas npm package on amazonlinux dev container instance, with following native dependencies installed. You may check the build layer script, build-layer.sh
, which is available in repository, 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, the layer aims to target AWS Lambda compatible and native build. As there are canvas libraries and frameworks relying on node-canvas running on Node.js runtime, this layer may also try to include and support those libraries and frameworks. Currently, following libraries and frameworks are included when building and packaging the layer:
Chart.js provides a set of frequently used chart types, plugins, and customization options. In addition to a reasonable set of built-in chart types, there are also community-maintained chart types.
Current supported version [email protected] with [email protected]
Fabric.js provides a missing and interactive object model for canvas, as well as an SVG parser, layer of interactivity, and a whole suite of other indispensable tools.
Current supported version [email protected]
Konva enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.
Current supported version [email protected]