Migrating to S3 from ec2

Static websites can be hosted on AWS S3 for a stable platform. This is a rough idea of 'what to do'. Instructions here may not be detailed and need you to search 'how to do'.

  1. Create an S3 bucket with hostname and region.
    If your website should be at example.com, create a bucket with the name example.com

  2. Upload all your static files (*.html, *.css, *.js, images, etc.) in this bucket. Use s3cmd or prettiest AWS dashboard.

  3. Make all files public. Otherwise, users would see a 403.

  4. Set static website hosting for your website. You can do this by right click on bucket --> properties.

  5. Your website should be now running smoothly on url like s3.blahblah.example.com

  6. Once you ensure everything is working, change your routes. Make a route53 entry to make your domain point to your bucket.

  7. If you were using Cloudfront and want to continue using it, change distribution settings and set origin to S3 bucket. Make sure you've uploaded certificates on AWS, if your website is on https.

Alas! Done.