-
-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace the "serverless" framework with AWS SAM #99
Comments
One huge positive here is that you’ll be able to more accurately replicate the Lambda environment locally. I find with debugging that needing to deploy between changes really slows down the feedback loop. With regard to ‘should we only target AWS?’; this is, as you’re no doubt aware, a tough question. AFAIK we can currently only run Bref on Lambda ATM anyway, so I doubt the current user base will be affected. However, what would that mean for the project if AWS natively supported PHP at some point in the future? Would we switch back to serverless? |
Agreed with the feedback loop, honestly what they did in SAM-CLI is pretty amazing, it works really well.
I would love for PHP to be supported natively! Bref has 3 goals right now:
Removing the 1st goal would only mean PHP gets faster, official support and less things to maintain. The 2nd goal is covered by Bref because IMO serverless and SAM are not good enough right now. Both do not allow some sort of "hooks" to run e.g.
So the "deployment" part in Bref is necessary IMO, especially to attract [PHP] people over to serverless hosting. And finally the framework integrations is something that AWS would never provide AFAICT, so Bref has a reason to exist if only just for that. |
Just discovered there is It seems to be running |
@mnapoli I am one of the devs that built
If you add a workflow for your framework, it will be immediately available to If you want, I am happy to work with you to add a PHP workflow for lambda-builders. Thoughts? |
@sanathkr this is awesome, thank you for your help! I'm looking at this right now. |
Should only focus on AWS? Well, I do my best to try to test and report issues I found, but this make me think sometime that we try to force a system to use something not made for. It is challenging and interesting, @mnapoli did a very good job here, but what about OpenWhisk? This is natively supporting PHP (they said) and also have affordable pricing list with free tier. If AWS one day support PHP in Lambda this will remove a lot of headache, but still Bref and serverless are way easier to use than AWS dashboard. AWS SAM? Well again this seems nice, but it looks like - I can be wrong - it is only for people who are looking for a tool to manage their fleet of lambdas. I am still surprised that AWS Lambda does not support PHP yet, as it is already stateless and should be easier to implement. |
@MickaelTH AWS announced two weeks ago an API to support any language, including PHP. See #100 for that. As far as SAM goes it does help to deploy multiple lambdas, but it's mostly about the deployment process itself as well as local development tools. It can do basically everything that serveless does but with more features, except it's only for AWS. |
I'm running into a large blocker with SAM local - any routes other than Apparently this is a known issue in SAM local but I haven't yet seen / come across a fix for it. A workaround is that you can add each of your root prefixes into Otherwise i think my local development cycle might have to be along the lines of:
|
That's not ideal at all indeed. Just to be sure I understand: what you are saying is that using If that's the case that's maybe a bug we should report back to their issue tracker, maybe they will fix it quickly if it's that important? |
That's correct; although I forgot to mention above that it's only I spent a good few hours last night trying to get anything other than I was looking for a way to make a regex for the For example, setting Setting Both I also wondered if there's a way of overriding the (FYI, |
FTR I think this is already in their bug tracker and triaged: aws/aws-sam-cli#437 |
Bref is currently using the serverless framework internally to deploy lambdas. I want to explore whether using AWS SAM could be an alternative.
Other lines to come, feel free to comment to add questions.
This comes with 2 questions:
should Bref only target AWS?
I'm leaning on a very strong yes here considering how everything even today with serverless (which is generic) is strictly tied to AWS. AWS is also the leading FaaS provider today, and supporting other providers would be a huge effort. By targeting only one we can provide the best DX, features and performances.
should Bref hide the details of the deployment tools, or should Bref integrates in the deployment tool?
What I'm getting at is that Bref could be a "whole in one" solution, hiding serverless/SAM (so that we control the details and we can provide a very simple user experience). Or Bref could be the "PHP part" that fits inside serverless/SAM (so that we can benefit from everything those frameworks have to offer).
The text was updated successfully, but these errors were encountered: