AWS Lightsail’s networking gave me a headache
This week at work was plenty silly. I was tasked with building the world’s simplest web app. A 4-route REST server blocked by a single login, connected to a SQLite database, running on a $5 Lightsail VPS. For my first crack, I wrote out the entire app in Go—my preferred language—but found myself annoyed when I realized Go’s SQLite library is a binding to C, and that to actually run my app I’d have to recompile my program on my server or install an older version of GCC. Which would not be really worth the effort. For my second, third, and final try I tried to deploy the site using Node and PM2 as my process manager. Node’s great for sites where performance isn’t crucial. Its many libraries and build tools make it perfect for creating any form of web property while promises make expensive operations as painless as a single-threaded runtime can be. The only problem with my Node site was that as soon as I set up Certbot, my site would break. No errors, no warning. Just consistently, as soon as I set up SSL, the application would break.
Turns out, AWS has a superset firewall you have to configure independent of your VPS. They’re also the only provider I’ve used that pre-configures a user other than root when initially setting up your server. To configure your firewall, use their web interface under the networking tab.
I think I’ll stick to Digital Ocean for now. Even with their recent price hikes.