hammerstone/sidecar
Sidecar lets Laravel package, deploy, and invoke AWS Lambda functions directly from your app. Define a simple PHP class plus the files to ship, choose any supported runtime (Node, Python, Java, .NET, Ruby, or OS-only), and execute from PHP.
Sidecar comes with a few CLI commands to make your life easier.
The install command publishes your sidecar.php configuration file. Once that file is published, you will no longer see it in your list of available commands.
php artisan sidecar:install
The configure command is an interactive command that walks you through setting up your AWS credentials. Dealing with AWS IAM can be a pain, so we wrote this command to do it for you.
php artisan sidecar:configure
The deploy command deploys your functions to Lambda, and can optionally activate them.
To deploy but not activate, run the command without any arguments.
php artisan sidecar:deploy
This will create your Lambda function but Sidecar will not use this version until you activate it. This give you time to deploy your entire application and flip the switch at the very end. To read more about this, see the Deploying vs Activating section.
If you want to deploy and activate, you can pass the --activate flag.
php artisan sidecar:deploy --activate
The activate command will activate the latest version of all of your functions to be used by Sidecar.
php artisan sidecar:activate
If you need to deploy an environment other than the one you are running in, you can override the environment from the config by passing an --env flag to the Deploy and Activate commands.
php artisan sidecar:deploy --env=production
php artisan sidecar:activate --env=production
How can I help you explore Laravel packages today?