With a little help from Amazon.
Guest author Pete Gamache is the head of engineering for AppCues.
You’ve read a lot about application programming interfaces and the power they have to connect software together. Maybe you’ve even come up with an idea for a service that other developers would build on top of—accessed through a brilliantly designed, coder-friendly interface.
So what’s stopping you?
If your answer is something to do with maintaining all the servers a sturdy API capable of handling millions of requests, I totally get it.
Servers are annoying, even in the age of cloud services. You choose them, provision them, configure them, deploy to them, monitor them, meter them. You decide when to add or remove them. And at the end of the month, you need to pay for what you used, and what you didn’t.
There is quite a lot to be said for a serverless architecture. It’s the quickest and cheapest way off the ground, for the hobbyist and scrappy startup founder alike. The explosion of software as a service in recent years has paved the way for the concept of “servers” to be someone else’s problem.
But there are things only servers can do properly. Cryptographic secrets, for instance, can’t be fully protected in browsers or mobile apps. Servers provide stronger assurances that a process will be run to completion. And browsers, though fast and reliable, are slow as hell and maddeningly uncontrollable.
If you want to do an API, you’re going to have to wrestle with servers.
Along came a familiar friend to anyone who hates the idea of handling their own hardware: Just about one year ago, Amazon Web Services, the industry leader in managing large pools of computing resources, introduced a new platform called Lambda for ephemeral computing. Users could supply code and, based on certain triggers, it would run somewhere, not immediately but milliseconds-soon.
There were plenty of limitations at first—a 60-second execution limit, to name one—but the service offered pure, serverless, on-demand computing, at prices that small and medium-sized businesses had no hope of matching themselves.
At this point, API Gateway and Lambda are mature and production-tested products. As long as your API requirements don’t include white-hot response times or long-lived requests, they’re a very attractive option for the startup on a tech-spend diet.
The great news is that it’s not only cheap to stand up an API with API Gateway, it’s also quick work. Ten minutes if you’re copy-pasting, half an hour if you’re a good typist.