Bacapesat — Migration from AWS EC2 to AWS Lightsail
I don’t like expensive, I hate expensive things and expensive services that I bought. That’s why I always want to improve the cost of what I use.
Short story: Previously Bacapesat.com hosted in AWS EC2, type t2.micro. I used this instance type because I got 1 year free for 750 hours of EC2 instance/month. Poor me, my free tier expired on September 2018. It affects my AWS bill in October 2018. From $0.68 (bandwidth & network), the bill increased to $13.39, it sucked!!.
So I decided to use AWS Lightsail, you can think of it like VPS (Virtual Private Server). Now I can host Bacapesat blog for $3.50 (It’s only Rp.50.000, very worth).
The migration process has done pretty straightforward:
- Launch 1 instance in Amazon Lightsail
- Provision the instance, install docker-engine & docker-compose (Bacapesat is dockerized ghost blog), detail here: https://github.com/HieronyM/Bacapesat-s-Blog
- Migrate blog data from old machine to Amazon Lightsail instance. I’m still using manual scp to achieve this, I don’t know if there is a better way
- Unzip data, and starting service (Bacapesat blog, Letsencrypt Nginx proxy companion)
- Update Bacapesat.com DNS record in Route 53 to the new IP address (IP address from your Lightsail instance), you can get the IP from Lightsail dashboard
- Wait until DNS propagated. in my case, it takes ~10 minutes
- Stop the old EC2 instance
- Bacapesat.com now can be accessed