Giter Site home page Giter Site logo

aws-lambda-php's Introduction

Running PHP on AWS Lambda

Build Status

Prerequisite

Compile static standalone PHP 7 binary

In order to use PHP on AWS Lambda, the PHP binary, including the required libraries, has to be integrated into the app. To do this, we have to compile the PHP 7.1.0RC5 with statically linked libraries:

sh build_php_7.sh

PHP Version

We are using PHP 7.1.0RC5 to compile the PHP binary To switch the PHP version you can set the Branch to checkout sources from a different branch by editing the "PHP_VERSION_GIT_BRANCH param on sh build_php_7.sh at line 8

Running local Unittest for the PHP Example Application

You can run the NodeJs Unittest with "lambda-tester" by building and running the specific docker container:

docker build -t lambda-php-unittest -f Dockerfile.TestLambdaApp .
docker run lambda-php-unittest

Running Example Application on AWS

To get the example application running on AWS you have to zip the php example script file, the NodeJS script file and the PHP binary together:

zip aws-lambda-php-example.zip index.js index.php php

Create Example Lambda Function

Now you can create a new Lambda function on AWS and upload the ZIP package: aws lambda php console settings

aws-lambda-php's People

Contributors

dannylinden avatar timklein87 avatar adamdry avatar ekle avatar kevbaldwyn 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.