Download the PHP package jonerickson/serverlessforlaravel without Composer

On this page you can find all versions of the php package jonerickson/serverlessforlaravel. 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 serverlessforlaravel

Serverless For Laravel

Deploy your Serverless Laravel application to AWS Lambda using this Laravel-ready plug-an-play package. Serverless For Laravel is built directly on the popular bref/bref runtime for AWS Lambda and takes care of the heavy loading of making sure Laravel is compatible in a FaaS environment.

Quick Start

  1. Install Serverless

  2. Install Package via Composer

  3. Publish serverless.yml

  4. Deploy to AWS

Layer ARN's

The following is a list of publicly available layer ARN's for your Laravel Application. Make sure to use replace the region in the ARN with the region your application is deployed to and choose the correct PHP version your application is using.

PHP FPM Handler for Web Applications:
ARN Current Version
arn:aws:lambda:us-west-2:037826224314:layer:php-73-fpm-laravel:3 3
arn:aws:lambda:us-west-2:037826224314:layer:php-74-fpm-laravel:3 3
arn:aws:lambda:us-west-2:037826224314:layer:php-80-fpm-laravel:3 3
arn:aws:lambda:us-west-2:037826224314:layer:php-81-fpm-laravel:3 3
PHP Function Handler for Event-Driven Applications:
ARN Current Version
arn:aws:lambda:us-west-2:037826224314:layer:php-73-laravel:3 3
arn:aws:lambda:us-west-2:037826224314:layer:php-74-laravel:3 3
arn:aws:lambda:us-west-2:037826224314:layer:php-80-laravel:3 3
arn:aws:lambda:us-west-2:037826224314:layer:php-81-laravel:3 3
CLI:
ARN Current Version
arn:aws:lambda:us-west-2:037826224314:layer:cli:3 3

Configuration/Documentation

Because this package is built on top of bref, all documentation provided by bref is still applicable.

Environment Variables

Deploying Laravel to a production environment can be difficult. Managing your environment variables for a Laravel application can also be difficult. This package makes environment variables a breeze. We utilize AWS' System Manager (SSM) application to load all environment variables into your Laravel application at runtime. Simply add all your protected environment variables as a SecureString Parameter in SSM, declare the path to your environment variables and Laravel will load them into your application.

In the following example, we can add our APP_KEY as a Parameter and set the name as /app/app_key. This package will take care of turning app_key into APP_KEY. The path then becomes /app/. We then set the path to the environment variable APP_SECRETS_SSM_PATH as seen below. This package will then load all environment variables that have the name /app/... If you would like to separate environment variables by environment, you may set the names as /app/dev/app_key or /app/production/app_key and then make sure to set APP_SECRETS_SSM_PATH as /app/dev/ and /app/production/ respectively.

This feature will take precedence over any environment variables declared in your .env file.

Order of precedence:

.env:

Console/CLI/Artisan

Because this package is built on bref, executing an artisan command is easy.

Under The Hood

What does this package do? Our published layers are built on top of bref's official PHP FPM Docker images. We simply tell bref's bootstrap file to also require a Laravel specific bootstrap file that does all the magic. You can view the laravelBootstrap.php file in /layers/fpm. This Laravel bootstrap file loads all applicable environment variables from AWS SSM, configure's Laravel to use /tmp (the only writable folder on AWS Lambda) as the storage and cache folder for all pertinent paths and cache's the configuration on each instance startup. After the Laravel bootstrapping has finished, bref takes back over and initializes their FPM handler to serve the requests.

Advanced

You can publish the layers that we use to deploy Laravel to your own AWS account. The layers will be created in the export folder and automatically deployed to AWS using the credentials configured for the shell session. Executing the following command will return a list of layer ARN's. Simply add the appropriate layer ARN to your list of layers in your serverless.yml configuration.

  1. Publish Layers to AWS

  2. Update serverless.yml

All versions of serverlessforlaravel with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5.8.0|^6.0|^7.0|^8.0|^9.0
illuminate/contracts Version ~5.8.0|^6.0|^7.0|^8.0|^9.0
illuminate/pipeline Version ~5.8.0|^6.0|^7.0|^8.0|^9.0
illuminate/http Version ~5.8.0|^6.0|^7.0|^8.0|^9.0
aws/aws-sdk-php Version ^3.204
bref/bref Version ^1.4
bref/laravel-bridge Version ^1.1
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 jonerickson/serverlessforlaravel contains the following files

Loading the files please wait ....