Serverless

Netlify Embeds Serverless Functionality into Its Web App Development Platform

20 Mar 2018 10:20am, by

Netlify, the spunky startup built around git-centric workflow, is pushing the envelope once again with the release of Netlify Functions, a tool that makes the deployment of AWS Lambda functions as effortless as adding a file to a project’s Git repository. Functions was created to knit together cloud-native microservices and API-driven tools on the back end in an intuitive, front end-friendly way.

“The JAMstack approach, where you have a static front end talking to a dynamic microservices backend, is so powerful and agile — but the missing piece was always the Lambda or functions integration as an organic part of workflow,” said Chris Bach, Netlify co-founder and president, referring to the approach of using JavaScript, APIs and Markup (the “JAM” in JAMstack) to build dynamic web applications. He explained that the push to create Functions initially came from engineers within the company — for their own use.

Netlify decided to focus on AWS Lambda because, he said, they wanted to support an existing system.

“For many devs, Lambda is painful — setting it up is hard, running it is hard,” Bach said. “We realized ourselves just how hard it can be after we’d decided to use it internally for verification, and our front-end team asked us for that little piece of service.”

Bach implemented a quick Functions prototype for internal use and realized, in the process, that this was, in fact, an essential service lacking in the marketplace. “It didn’t take very long to get it together, actually,” Bach said. “What took longer was building the mental model. How it could fit into our service, how to make immutable Lambda that could fit in with API gateways.” By October 2017 Netlify Functions was in beta testing, and at work in real life projects for the company — as well some Netlify clients.

Smashing Magazine was one of the first to try Functions, according to Matt Biilmann, Netlify’s CEO and other co-founder. “It’s a complex use case — they lean on Stripe’s API for subscription payment processing, Mail Chimp’s API for marketing and communicating, along with multiple other cloud-based service providers — but they also needed a little bit of glue to tie their microservices together with our platform,” Biilmann said.

“Before Functions, we would still have needed a server-side layer tying this together with custom code, but now all of Smashing’s services are united using just three different Lambda functions — across all three, about 600 lines of code,” Biilmann continued. “Three small independent functions creating a custom backend space. That’s it. Everything else is readymade, straight off the shelf.”

Biilman jumped back in, visibly excited about the public release of Netlify’s Functions service. “The real work-life application of serverless event-driven functions is tremendous, and the promise of functions is spreading like wildfire,” he said. “But all this potential was unreachable until we found a way to make functions integration a simple, even organic, part of the developer workflow.”

Netlify Functions at work in the dashboard. There’s not much more to show, TBH, because the feature is so baked-in and simple.

So in true Netlify fashion, Functions has transformed a previously complicated, even daunting, setup process… by simply adding a function to a folder in a project’s Git repository. Netlify will automatically recognize the function and deploy it along with the rest of the site. Just another folder in your project’s git repository pushed from the command line and instantly live (but with complete rollbacks): apparently, the market was more than ready.

“We released the beta and it went through the roof,” said Bach. “Developer feedback has been tremendous.”

Conjunction Junction, What’s Your Function?

Netlify Functions is not the complete developer’s fantasy in that it doesn’t supply the actual code — we devs still need to create the AWS Lambda functions themselves, the way we supply Netlify with the client side code. With Functions, Netlify now makes it just as easy to provide dynamic site functionality as it is to spin up a static site through their service: build it, then push from your git repo of choice.

This means devs without a lot of back end experience can now deploy also Lambda functions. Without the need to interact with AWS’s less than friendly UI, struggling to configure API gateways or coordinate deployments. (Actually, you don’t even need to set up an AWS account at all — Netlify even handles that piece, too).

Asa Smith, a front-end developer in Baltimore, Maryland has previously deployed projects with Netlify and is ready to jump into Functions. “I have felt overwhelmed by AWS — how to set it up, how to access it. The UI is intimidating,” he said. Recently, Smith used Google Functions and Firebase to set up a serverless blog project instead — because “It just felt so much easier using Google’s interface.”

Smith, who typically builds the client side of his web projects with the Spike SSG, said he is currently trying to integrate Algolia search into a client’s site. He needs to read the JSON content post-build process, and then write that back to Algolia. “The only way I can see to do it with Spike is by using some kind of cloud function unless I want to go learn Webpack and write my own plugin,” he said. “I’ve been requesting access to Netlify’s Functions beta for awhile because it looks like it will do exactly what the project needs, with the ease of use that I need.”

Along with the public release of Functions beta, Netlify is also releasing its Identity and Forms service out of beta  — two more offerings aimed at easing developers’ entry into the JAMstack ecosystem.

  • Netlify’s Identity feature is a JSON web token (JWT)-based user authentication service that manages sign-ups, logins, password recovery, etc. It can integrate with any service that understands JWTs, and is as simple as writing the JavaScript necessary to wire things up to your site and then turning on Netlify’s Identity service. Or you can simply adapt a pre-rolled login widget and CMS template, to make things truly turn-key.
  • Netlify Forms is a utility for managing forms and other site submissions — and is dead easy to use. Simply add a netlify attribute to any HTML <form> tag in your site markup, and submissions will be delivered to your Netlify dashboard — whereupon you’ll receive notifications, plus be able to trigger webhooks and redirect submission content to your heart’s content.

Access to all of these features is part of the Netlify platform. Signing up with Netlify takes less than a minute, and you can link your GitHub, GitLab or BitBucket identity instantly. Pricing is tiered, and everything starts out as free. Once a project’s usage exceeds the free tier’s limits, there is a “metered” pricing system that only charges for what is used.

“We do something we really love, and we want to make the JAMstack as accessible as possible for developers,” said Biilmann. Building these new workflows is essential in part, he added, because the front end developer’s role is rapidly changing.

“Front-end developers are now moving into backend space with things like approachable functions and microservices. While on the other hand, DevOps is building APIs instead of traditional monolithic backends…Two ends so far apart once upon a time, now meeting in the middle.”

And, he concluded, Netlify hopes to meet them there, providing that “glue layer” for fitting all the pieces together.

A newsletter digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.