runar1 / lumen-lambda
Enables lumen to run on AWS Lambda.
Requires
- aws/aws-sdk-php: ~3.0
- illuminate/console: ^5.1
- illuminate/support: ^5.1
This package is not auto-updated.
Last update: 2024-11-01 20:28:15 UTC
README
A package for running lumen on AWS Lambda.
Installation
Installation using composer:
composer require runar1/lumen-lambda
Add the service provider in bootstrap/app.php
:
$app->register(Runar1\Lambda\LambdaServiceProvider::class);
Usage
The project comes with a prebuilt php-cgi-7.0.16. Feel free to build your own.
- Create a lambda function on AWS.
- Make sure lumen is writing to /tmp or not at all.
- Run
php artisan lambda:deploy {name}
to deploy your app. - Set lambda handler to
vendor/runar1/lumen-lambda/index.handler
- Point AWS API Gateway to your newly generated lambda function.
For more indepth tips, read this excellent blog post: https://cwhite.me/hosting-a-laravel-application-on-aws-lambda/.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
History
- Version 1.3.2 (2017-05-31) - Deploy command is creating alias matching version
- Version 1.3.1 (2017-05-29) - Added parameter to deploy command
- Version 1.3.0 (2017-05-29) - Added command to deploy function
- Version 1.2.0 (2017-05-17) - Added curl certificate
- Version 1.1.2 (2017-05-11) - Fixed bugs with POST requests
- Version 1.1.1 (2017-05-09) - Fixed bug where request body wasn't sent to php-cgi
- Version 1.1.0 (2017-05-08) - Added support for MongoDB
- Version 1.0.0 (2017-05-05) - First public release
- Version 0.0.1 (2017-05-02) - Initial features
Credits
- Runar Heggset
- Chris White (https://cwhite.me/)
License
The MIT License (MIT)
Copyright (c) 2017 Runar Heggset
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.