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

Commands

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.

1php 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.

1php artisan sidecar:configure

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.

1php 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.

1php artisan sidecar:deploy --activate

Activate

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

1php 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.

1php artisan sidecar:deploy --env=production
2php artisan sidecar:activate --env=production