Amazon EC2 – how to change instance types

Amazon EC2 offer a range of instance types, and with an EBS backed instance, it’s relatively easy to migrate your server(s) from once instance to another.

The key is a command called ec2-modify-instance-attribute.

I’ve recently wanted to move my instance from something overspec’d and overpowered (m2.xlarge) to something more reasonable.
While it’s nice to have the power sitting there when I need it, it happens rarely enough that I can spare the 5 minutes it takes to spin up an m2.4xl to play around on dynamips.
For my always-on instance, a t1.micro is ideal.

The process for migrating involves the s3cmd library that the lazy among us can install with
sudo apt-get install ec2-api-toolsap.
(I’m running version 1.3-57419 2010-08-31)

The less automated of us can grab the code from http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip

Once set up, there’s a quick set up required involving your EC2 Private key and x.509 cert – (Link)

Add these lines into your .bashrc – (my instance is in eu-west-1 so the EC2_URL saves me adding –region eu-west-1 on each api call. YMMV.)

export EC2_PRIVATE_KEY=//pk-XXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
export EC2_CERT=//cert-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
export EC2_URL=https://ec2.eu-west-1.amazonaws.com
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/

a quick refresh of your .bashrc (source .bashrc) and you should be ready to go.

Here are the steps required to modify your instance type:

  1. First – let’s check on our running instances
    ec2-describe-instances
  2. Grab the instance-id from the output (e.g. i-1a2b3c4d)
  3. To modify our instance type we first need to shut down the instance.
    ec2-stop-instances i-abcdefg
  4. Lets check to see that it’s “stopped”
    ec2-describe-instances i-abcdefg
  5. Now lets modify the attributes so that it will start as a t1.micro (or whatever else you want )
    ec2-modify-instance-attribute -t t1.micro i-abcdefg
  6. Let’s check to see that the change has applied
    ec2-describe-instances i-abcdefg
  7. Start her up again
    ec2-start-instances i-abcdefg
  8. You might have to reattach your elastic IP (you do have one, don’t you)
    ec2-associate-address 87.238.255.255 -i i-abcdefg

  9. Check to make sure everything is ok
    ec2-describe-instances i-abcdefg
  10. And because I’m paranoid, let’s check the console output too
    ec2-get-console-output i-abcdefg

Once that’s done, and you can log in again, you’ve successfully changed your instance type (and can reap the performance or cost saving benefits).

There are a few caveats to this (you knew there was a catch coming at somepoint, right?). The main one to watch is that you can only migrate instances of the same platform. e.g. a 64bit running instance (on an m2.4xlarge) cannot move to an m1.small as this is 32-bit only. The t1.micro’s are advertised as “32-bit or 64-bit platform”, so if that’s your aim, you should be good.
Also – this only works on EBS backed instances. If you have an instance backed machine, you’re <redacted> out of luck.

I don’t know of a way to do this via the Web GUI – it would be nice if there was in the future, but for now the API-tools work well.

Setting up the api-tools also leads you into the path of being able to script some actions. Starting/stopping/tweaking things becomes childsplay now.

Happy migrating!

S.

AES Crypt – Advanced File Encryption

AES Crypt – Advanced File Encryption. – great little tool for simply and effectively encrypting files. Windows/Mac/Linux. Windows right click integrated and Linux command line. Integrates with bash one-liners nicely. Can’t fault it. Great app!

Dishpointer

Very handy service I’ve come across that combines google maps with the direction you need to point your satellite dish to pick up a given signal. http://www.dishpointer.com/ Makes my planning a lot easier. Worth a visit.

Droptext

Another addition to my Top10 most useful iPhone apps – Droptext.

Welcome Droptext – a cheap (€0.79) app that allows you to edit text files in your Dropbox.

I use this to good effect to keep my desktop ToDoList up to date. I’ve tried Evernote, Todoist, Toodledo as well as the iPhone Notes app and the Outlook Tasks, but none gave me what I wanted.

I have since settled on the Rainmeter Notes application pointing at a #ToDolist.txt file in my Dropbox. Now that I have Droptext – I can happily edit my Todolist on the go, and it will not only be safe in my Dropbox, but it will update my desktop Rainmeter page.

Evernote still has it’s place, mainly combined with the Firefox WebClipper plugin and tied into Google Reader but DropText gets my vote for Top10 most useful iPhone apps mainly for it’s simplicity, and for adding a feature that hopefully will make it into the official Dropbox app soon.

S.

Improve your iPhone4 with Antenna-aid and other observances.

The recent highly-publicized malarky around the iPhone4′s antenna has had some quirky side effects. On the downside, if you hold your €400 mobile phone the wrong way, it reverts back to being an iTouch. On the up side, you can now get a free bumper case from Apple (I was probably going to get one anyway), and you can now poke fun at Apple’s expense with Antenna-aid.

I first saw this on a Lifehacker post and it was easy to get and cheap enough so as to be a non-decision.

Phone arrived Friday – Antenna-aid arrived Monday – fortuitous timing.

As well as poking fun at Apple, it serves it’s function. No matter how tight my grip of death, with the sticker in place, I can’t bridge the 2 antennas (not antennae for radios apparantly).

If you’re interested either a) grab one of my remaining 5 off me, or b) go to their website at http://www.etsy.com/shop/Antennaid.

Another thing that I noticed while preparing the least interesting unboxing of all time was the EXIF data in the iPhone camera photos.

I couldn’t use my iPhone4 to take photos of my iPhone4 (mirrors aside), so I borrowed the girlfriends 3GS. The EXIF changes are interesting.

Property 3GS iPhone4
Title blank Back Camera
Dimensions 1536 x 2048 1936 x 2592
F-stop* f/2.8 f/2.4
ISO-speed** 125/100/160 400/400/250
Size ~1.2MB ~1.8MB

* this may differ, but on the 3 shots on each iPhone these were consistent
** as per *, 3 shots, same conditions, large differences in ISO-speed

It looks like the camera is improved in more than just Megapixels. Only time will tell. We seem to have finally caught up with the camera in my Nokia N95 of 2007.

While that was only mildly interesting, I noticed that the GPS data was in all 6 shots (from 2 phones). Windows handily has a “Remove Properties and Personal Information” button on the Image Properties dialog. Fat lot of use that did. I get “An error occurred when writing the property “Latitude” to the file ‘xyz.jpg’.

I’d be interested to hear if this is a PEBKAC issue (file was locked, or it’s easy to work around), or if this is a bit more incessant.

As it stands, I had to re-do the 6 images I posted to remove my GPS data. Thank you, once again, ImageMagick

I’ll update the blog with how the iPhone4 is holding up, and the bumper case too (if/when it arrives). So far, so good, I have a usable phone once more!

S.

iPad – it's own killer app.

I spent a few hours in the company of a new iPad last night. While I already consider myself a iConvert it was interesting to note the complete acceptance of the iPad by it’s new owner. The thing that was repeated several times was that “it just works” and there was not one mention of “how do I do XYZ”.

My family has been through multiple iterations of personal computing going back nearly 30 years. From the 8bit Commodore PET that I started my computing career on, through the middle ages of 8086 processors and dot matrix printers, early (floating-point buggy) P60 Pentiums, multi-screen behemoth’s, netbooks and the touch-screen age of Palm III/V, Dell Axim’s, iDevices and Android phones. I can safely say that we’ve had our fair share of cuts in walking close to the edge of technology. At each point along the way there was always something good and/or new to be exited about. VGA screens in the world of CGA, 28k modems in the world of dial-up Bulletin Boards and WAP access on bricks of mobile phones. But there was always a learning curve, a familiarization time, some sort of working out before the ease of use kicked in. Never in this long line of computing devices has something been taken in so quickly, and with such little resistance.

The iPad is it’s own killer app. The iPad can be picked up and instantly used. No familiarization, no quirky changes or setup, no menus or training. Just handled and used. It’s not without it’s pitfalls, a camera would be nice, as would external USB storage, or being able to tether it to my current 3G phone of choice. As long as you accept the features that it has now, and not the ones that you wish it had, it will be welcomed into any home.

While the device itself is creating a new niche for itself between the Lenovo Laptop and the iPhone/Blackberry, Apple have taken the lessons they learned from the iTouch and iPhone and kept usability at the forefront. It has fantastic industrial design and feels robust enough that you’re not scared to use it. When iOS 4 arrives and we have some rudimentary multitasking, it’ll add one more notch to the armory of this wonderful device.

Opponents of the iPad will extol the virtues of the Andriod OS and doubtlessly give a long list of why the impending arrival of Android tablets will be better than the iPad. To them I say it’s a personal choice, not a religious one. If I want something where I can tinker to it’s very core and play with the base features of a device, I’ll stick Linux on a laptop. For me the iPad has created a market for devices that just work, with ease, and that anyone can use.

If I wasn’t hell bent on getting an iPhone4 in the morning, I’d be hell bent on getting an iPad…. I’m hoping the new iPhone will placate that part of my brain that wants these things. At least until next months paycheck….

S.

iPhone4 release in Ireland

At last – we have some details about the iPhone 4 launch. It starts in 36hours (3 starting at 00:01 on 30/07/10) and only today do we get any details.

So here they are….

3Ireland iPhone4 price plans

3Ireland iPhone4 price plans

Vodafone iPhone4 Price Plans

Vodafone iPhone4 Price Plans

O2Ireland iPhone4 Price Plans

O2Ireland iPhone4 Price Plans

If we do some side-by-side comparison – let’s base it on the 16GB iPhone 4 around the €40/month mark.

Who Cost per Month Calls/Texts Data Extras
3 €219 €40 350flexi units (1min/2sms per unit) 2GB free 3to3, 1AddOn
Voda €279 €45 150mins/150texts 500MB none
O2 €259 €40 150mins/100texts 2GB 10MMS

Based on the table above, Vodafone are way off the mark.
3 seem to have the best deal, especially if you know other people on 3, but I don’t.
I also know that the O2 coverage in my area is good, but the 3 coverage is sketchy, don’t need a crackly call when I’m oncall at 6am.

Looks like I’m sticking with O2…. now, how do I guarantee that I’ll have one on Friday.

S.

[Update: three.ie have kindly stuck a comparison graphic on their site]
iPhone4 comparison from three.ie

Outlook 2010 – Color code your inbox.

One feature that I enjoyed having in Outlook 2007 was the ability to color code the emails in my Inbox. With blue being the default, it allowed me to quickly differentiate between random emails and ones addressed to me. Combined with the many, many rules I have set up, it means I can triage my overnight email in a few minutes. Outlook 2010 changed this functionality and moved it into Conditional Formatting. Here’s a quick guide on how to enable it again.

Conditional Formatting hides in:

  • View Tab
  • View Settings
  • Conditional Formatting

Step 1 - View Settings
outlook-colors-step2

outlook-colors-step3outlook-colors-step4outlook-colors-step5Last image stolen borrowed from blogs.msdn.com which I found only after I wrote this (typical).

Happy coloring.

S.

Hello world!

So… another blog – have seriously lost count of how many of these things I’ve started. Must be in double-digits at this stage. The first one is on the wayback machine from back in Oct 2001 (ah shucks).

Anyway, I find myself rambling on other peoples websites and generally causing a fuss about nothing. To make this (very) slightly more organised, I thought I’d try out the old blogging thing again.

To set expectations – we might (if we’re lucky) have occasional updates.

Let’s see how long this lasts……