Contact form processing is one of the biggest roadblocks for many when it comes to building a static website. To address the 90% use case, many services such as Formingo and FormSpree have popped up to address the growing popularity of static site generators like Hugo and Jekyll. These are great if all you need is a simple contact form with a few fields and a single email address however they are holy unsatisfactory if your need go beyond that.
One solution is to simply host the website and/or the form processing on a VPS or shared web host where a number of languages suitable for the task are available, think send.php
. However for many like myself, this almost defeats the purpose of using a static site generator in the first place. For one, you can no longer save money by hosting your site purely on one of the many excellent, cheap or free hosts for static websites. It also further complicates the deployment process and you have to put time into installing language runtimes on your server.
After recently using AWS Lambda to handle Twitter’s OAuth2 API requirement. I had a second thought that this technique could be used for many of the problems facing static website developers. In this post I will be explaining how to do contact form processing using AWS Lambda and SES with NodeJS.