Since day one of the serverless revolution there has been a consistent criticism that Its “not production ready”. Whilst this was arguably valid in the early days, the scaffolding that supports a serverless approach has matured over the last few years to a point where this is no longer true.
We all have our own favourites, but here’s a collection to get you primed:
You may think that a CDN is a weird choice for a serverless toolset, but when you’re paying per invocation, the underlying DoS protection, firewall and WAF setup can be a lifesaver. I like cloudflare for its page rules and advanced caching to take even further load of our architecture and costs.
Arguably their workers at the edge is in itself as serverless framework, but for simplicity we’ll focus more on the backend in this article vs the “edge” offerings that are starting to appear.
Top tip: When setting up caching via page rules, checkout the Origin Cache Control feature which lets you setup the caching instruction in your code and cloudflare will follow its lead.
Deployment and provisioning has come a long way and serverless is arguably at the forefront of that movement. With support for multiple vendors and languages, deploying code with serverless is as simple as authoring a yaml file. You simply choose what code you want to expose and what events it should respond to and serverless does the rest … as simple as serverless deploy
Top tip: If you’re using VS Code, look out for the serverless framework snippets.
Lumigo gives an end to end debugging platform you can’t find elsewhere. Most monitoring platforms (such as AWS X-Ray) fall down when traversing services such as SNS or SQS … lumigo intelligently maps your stack and can track traffic from Lambda to Dynamo via SQS .. and back.
Top tip: Lumigo is great for production environments, but can be a godsend during development so get it installed sooner rather than later.
4. Dynamo dB
A key sticking point in the early days of serverless was the lack of pay per use / serverless dB providers … essentially leading to an architecture whereby your code could scale as and when needed, but your database would still be statically provisioned. At best you would be over provisioned (and wasting money), at worst you would be under provisioned when a spike in activity hit (and suffer downtime).
Those days are behind us with services such as dynamo dB (noSQL), serverless Aurora (SQL) and Google Firebase now mainstream and battle tested. mongo Atlas (https://www.mongodb.com/cloud/atlas) is a worthy mention for those invested in mongo but as a DBaaS it’s still vulnerable to the provisioning issues mentioned above.
Top tip: utilise the vendor’s monitoring tools and set your alarms around throttling. Then day by day, week by week reduce your capacity until you get alerts. Once you know your level, add 20% for redundancy and you should have a fairly optimised platform.
Replicating your environment locally gives an extra piece of mind before deployment and these docker images give exactly that. Its the closest you can get to live as it replicates the AWS Lambda environment almost identically — including installed software and libraries, file structure and permissions, environment variables, context objects and behaviors — even the user and running process are the same.
Top tip: get this setup nice and early and you can benefit from an offline environment … perfect for the digital nomads amongst us.
In truth, we could have listed 101 supporting services that we rely on everyday, from twilio / sendgrid and cloudwatch to pureSec. The ecosystem is growing quickly and there is a lot of great offerings coming to market. If there’s one we missed that you think is worthy of a mention please let me know.
Final word: Anaibol maintains a staggering list of serverless tools which is well worth a read .. you can see it here: https://github.com/anaibol/awesome-serverless