Search code examples
amazon-web-servicesamazon-s3aws-lambdaaws-amplify

What are some different ways host a static site on aws?


Im looking at having out cms compile and spot out a static Html rendered version to host up on aws.

Iv had a google and already i have seen;

  • lambda
  • Amplify
  • S3

S3 being a bucket is kinda weird but cool.

But what is actually recommended these days to host a static website?

Currently the sites are virtual hosted in an ec2 instance with Laravel for front and back ends


Solution

  • AWS Lambda can be used to generate dynamic content, on any of your favorite languages. This is a low level compute engine that can be used as the backend of your content, and natively or with the combination of API gateway you can expose and endpoint. It’s overkill to use it to serve static content.

    AWS Amplify Hosting can host static content and provides some generators and continuous deployment helpers. If you don’t require a SPA framework on top of your Laravel, there is no need to get there.

    S3 static website hosting is the recommended way. It is the simplest and most cost effective option. It has minimal configuration and with the help of CloudFront it can scale and give you the functionality you need on top such as the website certificate.