Smart Tech for a better Web
Time & Bill has grown. I have started with an m1.micro instance from Amazon AWS EC2 which was available for free for one 1 year. But now these period is ending and I have considered to stay or to move to other services. For example, Jiffy Box came to my mind. But calculating a little bit, Jiffy is not much cheaper than Amazon EC2 when you use reserved instances (and calculate for a year). Google App Engine tied me to much to the Google SDK and honestly I want more access to my database. Google Computing Engine is restricted to a small amount of people and so I cannot use it. I like RedHats OpenShift and will consider going there later, but for now it still needs to grow and improve. So, finally I decided to stick with Amazon AWS because of the great tools and services available.
Now the problem was to upgrade to a bigger instance as sometimes it was not really funny anymore when it came to performance.
I decided to install the Commandline Tools. Basically this is downloading the package and putting it on your path. I do that with writing the following into ~/.profile
On Mac OS X you have to set your JAVA_HOME variable. You don’t need that very often these days. It can achieved very easily with putting this into your .profile too:
Now you should already be able to use the client tools, when you:
You will recognize that you need to authenticate against AWS to use these tools. It took me a little to find out that the keys I created for my EC2 instance are not the same I need to access with the CLI tools. You need to create keys on the security page. I uploaded my X.509 cert and as I only work with one AWS account, I could reference these keys in my .profile file too:
Now I am able to easily access AWS.
One thing I found out was, that I needed to sync my computers clock automatically. If you don’t do that, you’ll run into that error:
Once you synced the clock, it takes a few minutes then it will look better:
Now it is time stop my EC2 instance, upgrade it to a new type and restart it again. I found out what my instance id is (looked at the web console, but surely there is a CLI trick too).
Then I tried:
Well… I was sure this ID was there. Somewhere I found the tip to apply a region. I copied the region from the web console:
Looking at the available regions, well, eu-west-1a should be eu-west-1 (without a).
This finally worked well:
Quickly I “upgraded” the size of my instance:
Ups - please wait a little time, otherwise you’ll get that above. A few seconds later I was able to perform that change:
And now we need to start the instance again:
Very well - the instance was starting up again as I could see on the web console. After it started, my app was not reachable. This happened because the elastic IP i had was not longer associated with my instance. Once I fixed that, everything went well and was available as usual.
That being said, I am deeply impressed by all that technology. I would prefer not do deal with such low level details and work a little bit more in the direction of OpenShift, which lets me deal only with my app (PaaS). But well, Amazon EC2 is now - OpenShift is tomorrow. Let’s see what the new day brings.