dev-master
9999999-devAWS lambda for Laravel.
MIT
The Requires
- php >=7.1
- illuminate/support ^5.5
The Development Requires
by Oliver Nybroe
laravel amazon lambda
Wallogit.com
2017 © Pedro Peláez
AWS lambda for Laravel.
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)
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',
//TODO: not written yet., (*12)
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)
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)
AWS lambda for Laravel.
MIT
laravel amazon lambda