2017 © Pedro Peláez
 

library lambdavel

AWS lambda for Laravel.

image

uruloke/lambdavel

AWS lambda for Laravel.

  • Sunday, January 14, 2018
  • by uruloke
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • C
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SETUP

API's

This package is made for API's., (*1)

It can take your Laravel API application and make it fully scalable, with the power of lambdas. All you need to do is add install the package via composer, (*2)

composer require uruloke/lambdavel

And run, (*3)

php artisan vendor:publish
...
[x] Provider: Uruloke\Lambdavel\LambdaServiceProvider
...

Choose our package and there will then be added a file in your root directory called template.yml, which is AWS lambda's file for defining the endpoints., (*4)

Configuration

Before first use, you need to setup your domain for Lambda in your config file config/lambda.php., (*5)

Cache, (*6)

'aws-lambda' => [
        'driver' => 'file',
        'path' => '/tmp/laravel/framework/cache/data',
    ],

FILESYSTEMS, (*7)

'awsLambda' => [
            'driver' => 'local',
            'root' => '/tmp/laravel/filesystem',
        ],

.ENV, (*8)

CACHE_DRIVER=awsLambda
APP_LOG=syslog
FILESYSTEM_DRIVER=awsLambda
SESSION_DRIVER=array

SESSION, (*9)

'files' => '/tmp/laravel/framework/sessions',

VIEW, (*10)

Removed realpath` as path is first created after configs are loaded., (*11)

'compiled' => '/tmp/laravel/framework/views',

PHP extensions

//TODO: not written yet., (*12)

Non-API

If you are using this package for a non-api's, where you eg. supply css files and js files, the recommendation is to store these files at a file storage, like S3 for better speed and not paying for an invocation to the lambda, when the file is static., (*13)

Running local

If you wan't to run AWS lambda locally, but have no prior experience with this, run, (*14)

php artisan lambda:install

It will also prompt you to install the needed software for running the lambda's in local environment for testing. This includes SAM and Docker., (*15)

For starting the local edition of lambda's just run, (*16)

php artisan lambda:local

It wil automatically fire up SAM local, with the required parameters for our instance., (*17)

KEEP IN MIND LOCAL EDITION OF AWS LAMBDAS IS NOT COMPLETELY LIKE THE REAL VERSION., (*18)

You can for example experience 502 bad gateway, because of too many concurrent calls., (*19)

The Versions

14/01 2018

dev-master

9999999-dev

AWS lambda for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Oliver Nybroe

laravel amazon lambda