<story><title>The demise of the mildly dynamic website (2022)</title><url>https://www.devever.net/~hl/mildlydynamic</url></story><parent_chain><item><author>politelemon</author><text>&amp;gt; What captured people&amp;#x27;s imaginations about AWS Lambda is that it lets you a) give any piece of code an URL, and b) that code doesn&amp;#x27;t consume resources when it&amp;#x27;s not being used. Yet these are also exactly the attributes possessed by PHP or CGI scripts. In fact, it&amp;#x27;s far easier for me to write a PHP script and rsync it to a web server of mine than for me to figure out the extensive and complex tooling for creating, maintaining and deploying AWS Lambda functions — and it comes without the lock-in to boot. Moreover, the former allows me to give an URL to a piece of code instantly, whereas with the latter I have to figure out how to setup AWS API Gateway plumbing correctly. I&amp;#x27;m genuinely curious how many people find AWS Lambda interesting because they&amp;#x27;ve never encountered, or never properly looked at, CGI.&lt;p&gt;Well, assuming you are genuinely curious and not just using an expression!&lt;p&gt;The difference is that the &amp;#x27;web server&amp;#x27; is still consuming resources when the code is not in use. They aren&amp;#x27;t equivalent at all. The web server is hosted on an OS and both require ongoing maintenance.&lt;p&gt;Further, the appeal of Lambda is in its ease of onboarding for newcomers; I can run a piece of .NET or JS or Python locally and directly without a lambda &amp;#x27;layer&amp;#x27; to host it, just invoke the handler method.&lt;p&gt;I&amp;#x27;m not sure what complex tooling that the author is referring to though, it&amp;#x27;s a zip and push.</text></item></parent_chain><comment><author>icedchai</author><text>Once you add API gateway, IAM roles&amp;#x2F;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&amp;#x27;ll go crazy setting this up manually, so you&amp;#x27;ll also want Terraform or CloudFormation to make it repeatable.&lt;p&gt;For anything complex, you&amp;#x27;ll run into &amp;quot;slow start&amp;quot; issues and have to look at provisioned concurrency.&lt;p&gt;Lambda also sucks for dependencies. Zips and &amp;quot;layers&amp;quot; can only be so large. Eventually you&amp;#x27;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.&lt;p&gt;Also, it would be nice if Lambda just reused the CGI interface instead of inventing its own thing.</text></comment>
<story><title>The demise of the mildly dynamic website (2022)</title><url>https://www.devever.net/~hl/mildlydynamic</url></story><parent_chain><item><author>politelemon</author><text>&amp;gt; What captured people&amp;#x27;s imaginations about AWS Lambda is that it lets you a) give any piece of code an URL, and b) that code doesn&amp;#x27;t consume resources when it&amp;#x27;s not being used. Yet these are also exactly the attributes possessed by PHP or CGI scripts. In fact, it&amp;#x27;s far easier for me to write a PHP script and rsync it to a web server of mine than for me to figure out the extensive and complex tooling for creating, maintaining and deploying AWS Lambda functions — and it comes without the lock-in to boot. Moreover, the former allows me to give an URL to a piece of code instantly, whereas with the latter I have to figure out how to setup AWS API Gateway plumbing correctly. I&amp;#x27;m genuinely curious how many people find AWS Lambda interesting because they&amp;#x27;ve never encountered, or never properly looked at, CGI.&lt;p&gt;Well, assuming you are genuinely curious and not just using an expression!&lt;p&gt;The difference is that the &amp;#x27;web server&amp;#x27; is still consuming resources when the code is not in use. They aren&amp;#x27;t equivalent at all. The web server is hosted on an OS and both require ongoing maintenance.&lt;p&gt;Further, the appeal of Lambda is in its ease of onboarding for newcomers; I can run a piece of .NET or JS or Python locally and directly without a lambda &amp;#x27;layer&amp;#x27; to host it, just invoke the handler method.&lt;p&gt;I&amp;#x27;m not sure what complex tooling that the author is referring to though, it&amp;#x27;s a zip and push.</text></item></parent_chain><comment><author>chasd00</author><text>In a lot of these discussions the point gets raised about the work to maintain a self-hosted server. When i&amp;#x27;ve done it I install the os (usually ubuntu server), turn off unused services, setup the firewall to only allow required ports, and then it just sort of sits there and does its thing. Uptimes have been measured in years in some cases and the server just sits there happily serving whatever html and connecting to whatever db forever.</text></comment>