GithubHelp home page GithubHelp logo

tpiqweb / node-canvas-lambda Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jwerre/node-canvas-lambda

0.0 0.0 0.0 32.95 MB

An AWS Lambda layer for node-canvas

License: MIT License

Dockerfile 50.70% Shell 49.30%

node-canvas-lambda's Introduction

node-canvas-lambda

A node-canvas (and chart.js) layer for AWS Lambda

Install

Note: If you're not using Node.js version 12 then you'll need to recompile the layers. See the Build section below. Also, these layers include chart.js. If you don't want these modules included you can remove them from the Dockerfile (around line 19) and rebuild the layers.

AWS Console

  1. Clone the repository
  2. Log into AWS console and navigate to Lambda service
  3. Click Layers in the sidebar
  4. Click Create layer
  5. Give the layer a name, description and upload the node12_canvas_layer.zip
  6. Click Create
  7. Follow the previous 3 steps and create a layer for node12_canvas-lib64-layer.zip
  8. Click Functions in the sidebar
  9. Select your function in the function list
  10. Click Layers in the Designer panel
  11. In the Layers panel click Add a layer.
  12. Choose Select from list of runtime compatible layers, select the layer Name and Version and click Add.

AWS CLI

Clone the repository and follow the steps below.

aws lambda publish-layer-version \
--layer-name "node12CanvasLib64" \
--zip-file "fileb://node12_canvas_lib64_layer.zip" \
--description "Node canvas lib 64"

aws lambda publish-layer-version \
--layer-name "node12Canvas" \
--zip-file "fileb://node12_canvas_layer.zip" \
--description "A Lambda Layer which includes node canvas, chart.js, chartjs-node-canvas, chartjs-plugin-datalabels"

Build

The build script included in this repo will compile new layers and (optionally) uploaded them to AWS into your default region. Be sure to have Docker installed then run the follwing command:

./build.sh

node-canvas-lambda's People

Contributors

jwerre avatar alexlitel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.