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.
Serverless Microservices: Enables rapid deployment of lightweight, language-agnostic microservices (Node.js, Python, Java, etc.) alongside Laravel apps without managing separate infrastructure. Ideal for:
Cost Optimization: Reduces costs by avoiding dedicated servers for one-off tasks (vs. always-on Vapor instances). Pay-per-use Lambda pricing aligns with sporadic workloads.
Tech Stack Flexibility: Bridges Laravel’s PHP ecosystem with modern JS/Python/Java tools without forcing a full rewrite or external API calls.
Roadmap Priorities:
Use Cases:
OrderShipped → generate tracking PDF).Adopt Sidecar if:
Look Elsewhere if:
Alternatives to Evaluate:
"Sidecar lets us run lightweight, serverless tasks—like image generation or data processing—in any language (Node, Python, Java) directly from our Laravel app, without managing servers. This cuts costs for sporadic workloads (pay-per-use Lambda vs. always-on servers) and lets our team use their preferred tools. For example, we could replace a $50/month EC2 instance for PDF generation with a fraction of that cost, while keeping everything in-house. It’s a low-risk way to modernize parts of our stack without rewriting the whole app."
Key Metrics to Track:
*"Sidecar abstracts away the complexity of deploying Lambda functions from Laravel. With a few lines of PHP, you can:
Why It’s Better Than DIY:
Example Workflow:
LambdaFunction to define your function’s handler and dependencies.php artisan sidecar:deploy.OgImage::execute(['text' => 'Hello']).Tradeoffs:
--pre-warm flag.For Developers: "Think of Sidecar as ‘Laravel Mix for Lambda’—it handles the boring AWS stuff so you can focus on writing the function. Need to generate images? Write a Node.js script and call it from PHP. Want to run a Python script without setting up a server? Done. No more ‘just deploy this to a VM’—your Lambda functions live alongside your app and deploy together."
How can I help you explore Laravel packages today?