Hacker News new | ask | show | jobs
by upupandup 1421 days ago
The problem I find with these plugin serverless is that they rarely work well. Even with a framework produced by Chalice, there are issues that are largely so minor in detail but required to work well with AWS. Often they are not even code related but infrastructure.

IMHO, AWS Chalice remains the goto method to generate REST API serverless manner but also curious how yours also differ from the paid Laravel solution that lets you deploy your stack serverless.

1 comments

> IMHO, AWS Chalice remains the goto method to generate REST API serverless manner

Sidecar (my library) provides no REST API. You just... call the function from PHP. So you'd call it like

    <?php
    MyNeatServerlessFunction::execute(['foo' => 'bar']);
And that would run the function _on Lambda._ Whether that function is JS, Ruby, Python, whatever.

With Sidecar, you never have to configure anything in the AWS console, besides the initial IAM configuration. You give Sidecar admin keys, it configures all the permissions, roles, etc, and then self-destructs the admin keys. So you don't have to muck around with anything at all.

> also curious how yours also differ from the paid Laravel solution that lets you deploy your stack serverless.

Sidecar deploys and executes _non-PHP_ functions from your Laravel app. So it's completely different. Vapor deploys your whole app and runs it on Lambda, I just deploy single functions at a time.

So it doesn't configure API gateway? Not sure how useful this is since that is the entry point for all the lambda functions.

If I want to create functions easily I would just use pure functions in Chalice

@app.lambda_function(name='MyFunction') def myfunc: return 'OK'

and then I could go into MyFunction and modify the code. I just don't see why I would need to use PHP for this.

Correct, no API gateway.

> Not sure how useful this is since that is the entry point for all the lambda functions.

Well that's just not accurate! You can also call them via API. Which is what Sidecar does.

> I just don't see why I would need to use PHP for this.

Because you're already using Laravel! If you're not using Laravel, you wouldn't use this.

If you want to see me doing a live-demo of this at a conference, it might make a bit more sense: https://youtu.be/0Rq-yHAwYjQ?t=11751