Sidecar — Deploy and execute AWS Lambda functions from your Laravel application.

Commands

Refine is a paid package. To purchase, head to hammerstone.dev.

Sidecar comes with a few CLI commands to make your life easier.

Install

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

Configure

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
Code highlighting powered by torchlight.dev, a Hammerstone product.

Deploy

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

Activate

The activate command will activate the latest version of all of your functions to be used by Sidecar.

php artisan sidecar:activate

Overriding the Environment

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