Moving into the cloud: PiTank is hosted on AWS!

Glad to announce that is now hosted on Amazon Web Services(AWS)!

AWS Free Tire provides 1-year of Cloud Services at no charge. It has some limitations, but it is more than enough for your own blog on a wordpress. Also it gives nice expericence of using cloud and adopting it for your needs. AWS is nice for rapid scaling your application and introducing new serviceses.

Migration from a previous server to AWS is relatively easy to do. Clicking create_instance->next->next works fine here, but you don’t know much about AWS infrastucture, billing and so on at this point. So decidions you make during initial migration is not the best (at least for me it is completely true).

During the initial migration I did two not optimal decisions, that took about one week to correct them in a proper way:

  1. By default my EC2 server was allocated from Oregon location, so I proceed with the migration there. Everything was fine except one thing: ping. It took 200ms just to ping my server. I did it from Belarus, so each time I accessed it, packets had to travel over the ocean and it took a while. Solution was to migrate the instance to Europe. So now I have 50ms ping to the server and I am pretty satisfied with it.
  2. I found that Free Tier allowed to use up to 30 Gb Volume*month, so I created one of such size for my EC2 instance. My drive usage was about ~2Gb. But I created a big drive just to make sure that there would be no need to extend it in the future. And as you can see it was wrong. Amazon charges not for the actual space you are using on the drive, but for the entire drive(volume) size. And during migrations you create additional temporary volumes, that can easily kick you out of the free tier limits, so you get into a paid area in this case. So it is much better to create volumes with a size not much bigger than you actually need. But what to do if you already have an instance with 30Gb? Start over? No. You can shrink the volume of your drive to some smaller size. Even if there is no tool for doing that from AWS UI, it is still possible. I followed two or tree instuctions, but they didn’t work for me (instance could boot after shrinking). So I came up with my own way of shrinking volumes on AWS.

Vote in comments if you want to see more details as a post about how [1] or [2] were resolved.

2 thoughts on “Moving into the cloud: PiTank is hosted on AWS!

  • September 14, 2015 at 3:45 pm

    A guide on how to resize a disk internally from the VM would be interesting to read! [2]

  • September 14, 2015 at 8:23 pm

    Hi Artem! Ok, will do!


Leave a Reply

Your email address will not be published. Required fields are marked *