3 ms·
Once you add API gateway, IAM roles/permissions, VPC, security groups, it gets a lot more complicated. Then you want to host a static web site, reverse proxying
by icedchai 2y ago
Once you add API gateway, IAM roles/permissions, VPC, security groups, it gets a lot more complicated. Then you want to host a static web site, reverse proxying to API gateway, add CloudFront, WAF, etc. You'll go crazy setting this up manually, so you'll also want Terraform or CloudFormation to make it repeatable.
For anything complex, you'll run into "slow start" issues and have to look at provisioned concurrency.
Lambda also sucks for dependencies. Zips and "layers" can only be so large. Eventually you'll hit the limit and have to move to containers. There are also other limitations, like payload sizes. Eventually you might run into that, too.
Also, it would be nice if Lambda just reused the CGI interface instead of inventing its own thing.
- owenversteeg 2y agoYeah, it's an absolute explosion of complexity, and with it comes the risk that you miss something and are faced with a security issue or giant bill or both. What I would kill for is something in between all of this and FTPing PHP around like it's 1999. I've hunted for years for middle-ground solutions and haven't found anything. Security, cost, performance etc are important, sure, but what I really yearn for is a simple, easy, bulletproof solution like the days of yore when a handful of simple scripts could chug on for decades. Two decades ago you could set up a simple site that needed no attention for twenty years. Today's technologies require constant attention and updates and if you blink then everything requires an update that's not compatible with your code. Meanwhile, PHP from 2004 can be trivially run in 2024. What's the PHP-and-FTP of today? Does it exist?
- denton-scratch 2y ago> Two decades ago you could set up a simple site that needed no attention for twenty years. ...but as of yesterday, you can't?
- twobitshifter 2y agoHave you seen https://www.val.town/ https://www.val.town/ ?
- llm_trw 2y agoIt's still php-and-ftp. Sometimes I get fancy and use python and ssh.
- icedchai 2y agoI was going to say the same thing. I generally use Laravel instead of "raw" PHP these days, but still...
- ArneBab 2y agoI nowadays mostly use a simple static website plus minimal Javascript, but I still have PHP sites. It still works. And PHP today is at least factor 3 faster than PHP was back then — on the same hardware. So maybe just use PHP and ftps or sftp?
- konfusinomicon 2y agotgere are far better ways but for the sake of simplicity I suppose you could ssh in to box, cd /some/dir, and git pull on the latest branch. that way atleast you have version control and can rollback quickly if you bork your site
- zeroq 2y agoActually they don't, at least most of the time. At my last shop the entry cost for hosting a single static file was around $2500 for infra, because that was the agreed upon template for a project that was pre-approved by all neccessary committees. I've tried to fixed it for quite some time, presented solution to C level, got some initial funding, but eventually after many pushbacks I died on that hill. People like to play with toys, cv driven developement is a real thing, and when it comes to security and compliance everyone want to be sainter than the pope, just in case.
- icedchai 2y agoIs that $2500/month?
- inopinatus 2y ago> nice if Lambda just reused the CGI interface Lambda is an event-driven system; synchronous, stateful request/reply for HTTP is shoehorned onto that. At heart it's a scale-out queue processor, not a web server. This whole "lambda gives your code a URL" folks speak of, is actually an API Gateway thing. This is also why Lambda has at-least-once semantics rather than that at-most-once, which definitely surprises the casual web developer from time to time ("why did that happen twice??"). That said, I don't disagree with the sentiment; it would be quite nice if API Gateway had a simple option to map incoming request parameters to CGI-like attribute names in the event payload.