Notes and anecdotes

Techstuff rambling

AWS S3 and CloudFront workshop

Last week, I held an AWS workshop on how to host a (dummy) React app there, in S3 and with CloudFront. If you’d like to learn what I taught the others, a github repo is available at

HTTPS for AWS CloudFront and AWS ELB

Wow, such easy, much free! A few simple steps on 1) How to obtain a certificate for your domain, and 2) how to use it on your CloudFront or Elastic Load Balancer.

Add S3 bucket + CloudFront using Terraform (example)

Case: I have some frontend app that consists of static files, e.g. a React app packed with WebPack. I want to deploy it to S3, with CloudFront in front of it. (Optional) I also want index.html to be rendered when other paths are requested (such as /food/cake-is-best), and for the site to return 200 status instead of 404.

Add S3 bucket using awscli (example)

Here’s a simple step by step guide on how to create a s3 bucket, with an attached cloudfront and a user with write access. This is typically what you want if you need quick hosting for static files for you website. This is made in contrast to the terraform guide, which does the same, but using different tools If…

Continue Reading

Django on Heroku with AWS S3 bucket for static and media files

Case: You want efficient collectstatic and serving of files You want static files and media files to be hosted on an AWS S3 bucket. (optional) You have too many files for “normal” collectstatic to be efficient. (optional) You have a non-US S3 bucket. (optional) You use Heroku Disclaimer: Have not tested with python 2.7, can’t…

Continue Reading