How would you create a simple scalable serverless dynamic HTML page in AWS?

400 views Asked by At

I need to create a simple scalable dynamic HTML page.

  • Simple because it only needs to validate and concatenate a query string value.
  • Scalable because it can reach 100 requests per seconds.

Usually I would create a PHP file, and do my stuff. https://www.example.com/view.php?id=123456

The serverless way to go seems to be Aws API Gateway and Lambda. But, at $3.50 per million API calls the price is staggering compared to what an EC2 instance can do.

Any other options ? Is the AWS "serverless" tech mature enough to create a truly scalable dynamic web page ?

1

There are 1 answers

0
Dave Maple On

Not sure why you got so many down votes -- maybe it's the fact that there is some opinion involved in the question -- but it's a totally valid question. There are use cases where javascript apps are insufficient and where one might want to render dynamic content as HTML as a response from API Gateway.

In my experience people are already using API Gateway => Lambda in production to render HTML documents. I've seen several use cases in the last year. One of them uses a templating engine in a Lambda function to render templates stored in S3.

I will say that when you try to do it it becomes clear that API Gateway wasn't exactly designed for this use case -- but it works.