Last week I finally decided to migrate my personal website from pythonanywhere to
an AWS S3 bucket. It is a change I've been wanting to make for a long time but for some reason I could
never find time to do it. In this little blog post I'll be sharing what I learnt in the process.
Transferring the domain name to Route53
I figured that if I was moving to AWS then I might go all the way and move my domain name ownership as well.
The offcial Route53 docs were a little heavy on the reading side for me, but still useful. I still managed
to screw up though, and I ended going offline for about 10 days: the amount of time my old registrar (namecheap)
took to transfer the domain.
I had never transferred any domain names to Route53 or any other registrar for that matter, so it was kind of scary
at first due to all the e-mail confirmations and codes; they take all this domain ownership very seriously,
and I'm glad they do.
Creating the S3 bucket
I was impressed by how easy this was, plus, the
AWS offers is beyond useful, clear, simple, and straight to the point. It was such a fun experience and I
really enjoyed the whole process.
Now, I'll be listing some pros and cons (from my point of view) of migrating to a static website using S3.
I used to pay $5/month with pythonanywhere (a great deal for what I was getting), but now I pay $0.50
a month for the Route53 hosting zone and I think that's it because I'm still inside the 12 months of the
S3 free tier. With what I'm saving I might even set up an email with WorkMail.
I'm working with the .html files directly now, no WYSIWYG editor or anything, so I kinda have more
control over what I can do since I operate on the .html and .css files directly.
Since I'm serving the files directly it loads a little bit faster, and the overral size of the files
I don't need to manage servers, patches, updates, or anything of the sorts. If I want to update a file
I literally just drag and drop the new version.
Sometimes it can be a bit tiring to be working on an IDE directly with the files instead of a web editor
like summernote or froala.
No server-side scripting
Since it is a static wbesite it works better to show things than to do things. I can't have
a dynamically generated graph or stuff like that.
All my files have the same header, footer, and meta files; I can't use a template like in Flask + Jinja
to just write the content and keep everything cleaner.
Final thoughts and future
It was a fun, new experience and I'm glad I made the change. The next step is to use a CloudFront distribution so I can
serve my files with https.