Bacapesat — Migration from AWS EC2 to AWS Lightsail

Hierony Manurung
2 min readNov 26, 2018

--

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!!.

My AWS Bill for last 3 months

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:

  1. Launch 1 instance in Amazon Lightsail
  2. Provision the instance, install docker-engine & docker-compose (Bacapesat is dockerized ghost blog), detail here: https://github.com/HieronyM/Bacapesat-s-Blog
  3. 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
  4. Unzip data, and starting service (Bacapesat blog, Letsencrypt Nginx proxy companion)
  5. 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
  6. Wait until DNS propagated. in my case, it takes ~10 minutes
  7. Stop the old EC2 instance
  8. Bacapesat.com now can be accessed

--

--