A small serverless project

Last week one of my clients asked me to build for them a landing page for a conference they were organising. All they needed was a page with some info about the conference and a “contact us” form. They also advised that they were planning a promotion campaign 3 weeks before the conference takes place, so this mini-site should be able to handle the expected traffic spikes.

I decided to tackle that using a serverless approach — no server provisioning, don’t worry about peaks and pay only when traffic comes. Nice!

I ended up with a small solution that is based on AWS and I decided to share this with the world (Github repository). It’s not ground breaking, but it has some interesting elements for anyone who’s interested in serverless.

More details in the repository’s README, but in a nutshell:

The repository includes a CloudFormation template that will provision all necessary resources:

A flowchart should make this post look serious!

Once the template has completed successfully you should upload the landing page HTML file/s to the new S3 bucket. I provided in the repository a sample page that has all necessary code to submit the “contact us” form to AWS API Gateway. You can expand this basic file to a much bigger website (static content only) and use the code in index.html for implementing the contact form submission to API Gateway.

You can use this repository for creating your next landing page or for learning a bit about serverless architecture/infrastructure.

That’s it! Enjoy! :)