Download the PHP package lambdaphp/lambdaphp without Composer

On this page you can find all versions of the php package lambdaphp/lambdaphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lambdaphp

LambdaPHP v0.02

Host your website on Aws Lambda with full PHP 7 support (i.e. pay by requests instead of paying a fixed monthly hosting fee).

Now it's possible for you to host dynamic PHP files, static HTML files, css files on AWS Lambda (serverless) just like an Apache server running mod_php. Any files you put inside the public directory will be accessible as if they were hosted on an Apache server with mod_php. There are no handlers to write or config files to maintain.

For example, put two files, index.php and deep/other.php inside your public folder. The type lambdaphp deploy -v. Once deployed you should be able to access them online at https://yourdomain.com/index.php, https://yourdomain.com/deep/other.php, etc (details below).

But why should I care?

The Difference is you don't have to pay any monthly hosting fees because they're running on AWS Lambda which means you are billed only by the number of requests. This includes 1 million free requests per month and 400,000 GB-seconds of compute time per month (details here).

Other advantages of going serverless include

Installation

Installation is simple. All you need is PHP 7+ with composer

To install, just type this on your command line (terminal)

composer create-project lambdaphp/lambdaphp <project-name>

This should create a project-name directory inside which there is a public directory. Any files, including any PHP files you put in the public directory can be accessed directly from your web browser.

Once you're done putting files in the public folder, just type this on your command line to deploy your site on AWS Lambda:

lambdaphp deploy -v

You may need to enter your AWS credentials as described here (same as aws-cli).

If everything goes as expected, you should see this message:

Website deployed!
To access your site visit:
https://XXXX.execute-api.us-east-1.amazonaws.com/web/&lt;any-file-in-public-folder><.php|css|js|etc&gt;

(If you get a "command not found" error, make sure you have ./vendor/bin in your PATH)

That's it! LambdaPHP will give you the URL using which you can access your site just like any other site hosted on Apache. It is possible to use your own custom domains with https too (details here).

Features

Using LambdaPHP you can now use AWS Lambda to:

Examples

You can also use your own domain to host these demos

New layer support

In previous version of lambdaphp you had to upload the PHP executable and a bunch of files (min 32MB) every time you made even a small change to any php file. Starting with this version lambdaphp now uses AWS Lamba Layers. It even creates a seperate layer for the vendor dir (inside public directory) to ensure that minimum amount of update is needed to deploy.

By default it uses the PHP layer which I've compiled with PHP 7.3 (with most mods including ImageMagick) but if you want to use a custom LayerARN, just modify your lambdaphp.ini, create a [php] section and set the layerArn value to your own Layer's ARN. Read the FAQ for more info.

So anyway, what this means to you is that previously it meant even a small update took 40MB and 5 minutes to deploy, the same can now be done in 1kb under 1 sec! How's that for speed improvements? :)

Limitations

FAQ

Need more features?

This was just a weekend project for my own amusement but I will definitely add more features

Credits

Sanchit Bhatnagar - Co-creator

Navneet Rai - Co-creator

Thanks

License

The software is licensed using a GPL License. It means you can do whatever you want with it (including using it for commercial purposes freely), as long as you include the original copyright and license notice in any copy of the software/source.


All versions of lambdaphp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-zip Version *
lambdaphp/installer Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lambdaphp/lambdaphp contains the following files

Loading the files please wait ....