Being the cheap-o that I am, I had an idea the other day of running a web app for less than a nickel per month with AWS:
- Serve a static site (html/css/javascript) via S3
- Client-side code and forms post to Lambda golang microservices via API Gateway
- Use DynamoDB (25 read/s, 25 write/s, 25GB, 1GB/mo in, 1GB/mo out) as database
Would this scheme work with say, cookie and sesssion-based authentication, as the page is being served by one domain name (S3), but the javascript is talking to another domain name (API Gateway)?
What other issues am I likely to run into?
Mike Roberts wrote a very thorough article on serverless architecture and its trade-offs: http://martinfowler.com/articles/serverless.html
Also discovered a framework designed for precisely this which runs on AWS: https://serverless.com/
However, it appears at this time, persistent connections (e.g. websockets) are not supported, which is a deal-breaker for me. I suspect AWS will eventually let API Gateway service the websocket and send its messages to Lambda, but as of today this does not appear to be possible.