S3, API Gateway, Lambda, & SES for static website hosting with email

I’ve come to a point where I don’t want to manage the infrastructure hosting my websites. I think it’s a reasonable conclusion, given that I can use AWS to get this done without a sweat. A lot of today’s websites don’t really need to be written in PHP (or any other server-side language). Most sites are just online contact cards, with one small exception – they still want to allow you, the visitor, to send them an email from their “contact page”. And in order for that to happen they need to have some server-side smtp code listening for POST requests with the visitors’ contact info.

Well, with the combination of API Gateway, Lambda, & SES you can run your whole website in a managed way for really cheap (my calculations come to a $1 a month). Although it’s very cheap, the main point isn’t the price, it’s the hassle-free way of running a website and letting AWS manage it for you.

I’ve created a Java Lambda function and shared it on GitHub that takes care of the email component. All you have to do is to follow instructions on how to deploy it and also, obviously, upload your site to S3.

Let me know if you have any questions. Enjoy!

 
comments powered by Disqus