Git Product home page Git Product logo

gm-lambda-layer's Introduction

gm-lambda-layer

Example how to build and publish your own GraphicsMagick lambda layer.

How to use

First you need to build the layer. You can do it by running build.sh script. It will create gm-layer-<version>.zip file in the root directory. Note that the build can take a while.

Then you need to publish the layer. You can do it by running publish.sh script. It will create new lambda layer. For this you need to have AWS CLI installed and configured with your account.

Lambda Test

You can use the test lambda function in the function directory to test your layer.

First you need to install dependencies by running npm install in the function directory.

Then pack the function by running pack-function.sh, it will simply create function.zip file in the root directory.

You can create new lambda function using the AWS Console and upload the function.zip file.

After creating the function you must add your graphicsmagick lambda layer to it. You can follow the official guide.

pdf2pic library requires ghostscript binaries as well. Add the community driven Ghostscript lambda layer.

arn:aws:lambda:<YOUR REGION>:764866452798:layer:ghostscript:<VERSION>

Run your pdf2pic-demo lambda function by using the test feature in the AWS console. Test event can be anything, it's not consumed.

If the layer works, you will see status code 200 with bufferLength > 0 and base64 encoded image in the body field.

License

MIT

gm-lambda-layer's People

Contributors

mskec avatar

Watchers

 avatar  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.