Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sidecar Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Environments

Sidecar functions are separated by environment, so that your local development functions don't overwrite your production functions. You can have as many environments as you please.

By default, Sidecar will use the environment from your Laravel application, which itself comes from the APP_ENV environment variable.

If you'd rather use a dedicated environment variable for Sidecar, you can use the SIDECAR_ENV variable.

<?php

return [
    /*
     * Sidecar separates functions by environment. If you'd like to change
     * your Sidecar environment without changing your entire application
     * environment, you may do so here.
     */
    'env' => env('SIDECAR_ENV', env('APP_ENV')),
];

This can be particularly useful when you're developing in a team. If everyone on your team has APP_ENV=local in their environment file, then it's likely that functions will inadvertently be overwritten by your teammates, which is both confusing and frustrating.

In this case, it would make sense to set your Sidecar environment to e.g. SIDECAR_ENV=aaron_local, SIDECAR_ENV=sean_local, etc.

This way Sean & Aaron have different environments and won't overwrite each other's work.

Faking the Environment

If you need to deploy an environment other than the one you are 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

This is useful when you want to build and deploy from either your local machine, your CI pipeline, or GitHub Actions, and then you want to activate as your Laravel application rolls out.

Head over to the Deploying section to read more about activating & deploying your functions.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport