GithubHelp home page GithubHelp logo

smoll / phantom-lambda-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from justengland/phantom-lambda-template

0.0 0.0 0.0 85.34 MB

The bare minimum for a phantomjs app to run on Amazon Lambda.

License: MIT License

JavaScript 100.00%

phantom-lambda-template's Introduction

PhantomJS Lambda Template

This is a reference implementation of running PhantomJS on AWS Lambda deployed with AWS CodePipeline.

Background

PhantomJS needs to be compiled for the OS you plan on running it and this can be painful because of that fact. This could be circumvented with a build server, which is a very personal decision and it was hard to commit to a build server for this little project. Now with AWS CodeBuild, this has become a trivial matter. So we are using AWS Developer tools 100%, AWS created a great walk through: Automating Deployment of Lambda-based Applications I have done my best to automate the walk through, so its simple and repeatable.

Setup prerequisites

  1. Setup your AWS account and AWS CLI
  2. Fork the project
  3. Setup a personal access token with GitHub for AWS CodePipeline , you can skip this if you use AWS CodeCommit but you will have to change the cloudformation. https://github.com/settings/tokens

Install local dependencies

$ npm install

Test local install

$ npm test

Deploy the pipeline

npm run deploy-pipeline -- --parameter-overrides \
           EnvironmentName=phantom \
           GitHubToken=< your token > \
           GitHubUser=justengland \
           Repo=phantom-lambda-template \
           Branch=master
# **Note:** npm version 2.x or newer required to pass arguments to the scripts using `-- args`

View your work

  1. Checkout AWS CloudFormation
  2. Watch as AWS CodePipeline creates a new stack
  3. Once the stacks are finished test your AWS Lambda

phantom-lambda-template's People

Contributors

justengland avatar christianklotz avatar kessler avatar pnc avatar brendannee avatar mjmasn avatar satetsu888 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.