Posts tagged as:

howto

I just spent the last ten days trying to do an import on Amazon S3 using their Import/Export service. Basically Import/Export allows you to send a drive to Amazon via snail mail and they will hook the drive to their system and import the data locally. It’s much faster than trying to upload the first snapshot of the data via the good old internet.

The problem is that the service requires you to produce a manifest file (to let them know what bucket to load unto as well as some other information) and a signature file on the unit itself that verifies that you are the legitimate owner of the process.

The official documentation can be read here, but I will give you the “real” how to.

The first thing you do is to make a manifest file. Instead of writing the file, I opted to use the S3Fox Firefox extension, which writes the file for you. This is a problem, and I will explain to you why later on.

You will be better off writing the file yourself, and it’s not that complicated. Just write the following:

manifest-sample

I added a couple of extra variables.

Because I wanted the files to go into a specific path, I added the “prefix: myownpath” so that data is sucked in there. The “deviceid” is the serial number of the unit you’re shipping.

I also listed the types of files (which is kind of weird, but Amazon requires it). Here’s the list I did:

contentTypes:
flv:application/x-shockwave-flash
mov:video/quicktime
wmv:video/x-msvideo
mp4:video/mp4
pdf:application/pdf
ai:application/postscript
zip:application/zip
mpg:video/mpeg
mp3:audio/mpeg
psd:image/psd
png:image/png
jpg:image/jpeg
gif:image/gif

Now here’s my nutshell of advice to y’all: Make sure you create this file on a Linux/Unix environment and not using Windows programs or S3Fox. Again you’ll see why later. Create this file using vim or emacs and then save it as “manifest.txt”.

Send an email to “awsimportexport@amazon.com” with the subject “CREATE JOB” (all caps) and attach the manifest.txt file to the email.

Amazon will take its time and then reply back with something like this:

SUCCESS
JOBID: J5N9M
deviceId:97333A9360CC3

You will now need to create a SIGNATURE file. Download the signature generating tool from Amazon and put it on /tmp or create a folder and unzip it.

Go to the directory and run the following command:

java -jar lib/AWSImportClientSignatureTool-1.0.jar manifest.txt J5N9M SIGNATURE

As you can see, you need the JOBID that Amazon sent on the email. The “SIGNATURE” is the name of the file. Leave it like that, all caps.

The script will ask you for your Amazon AWS Secret file. Copy and paste it and then it will generate the SIGNATURE file. Copy that to the root folder of the unit you will ship.

Now you just need to print out a shipping label to put inside the box with the storage unit, and UPS/Fedex to Amazon. Here’s the documentation for that.

You should get an email when Amazon gets your unit and starts the importing.

So for the HOW-NOT-TO-DO-IT guide: I created the manifest file using the S3Fox tool and saved it on my Windows Desktop. I opened it using Notepad to double check everything was fine.

I sent the CREATE JOB email and received the JOBID. I then used S3Fox again to create the SIGNATURE and shipped the unit.

When I got the email from Amazon that they had received the device, it had a failure: The SIGNATURE file was invalid.

I had a back and forth with AWS for 5 days. They were really helpful (Thanks Chesley and Eric!) but I wasn’t clear what I was doing wrong. It turns out that when the manifest file is generated and saved on Windows (or opened in Notepad) Windows will insert character returns at the end of each line, and the SIGNATURE generated in S3Fox takes this into consideration. But when Amazon processes the manifest, it strips out these character returns and generates a SIGNATURE that, when compared to the one you send, is not the same, and thus marks as invalid.

So make sure to just do the whole process on your Linux terminal and not on your Windows GUI and you’ll have your backup done in no time.

{ 2 comments }

PubSubHubbub + WordPress + Feedburner + FriendFeed = Realtime Awesomeness

July 27, 2009
Thumbnail image for PubSubHubbub + WordPress + Feedburner + FriendFeed = Realtime Awesomeness

PubSubHubbub is a fancy name for a rather new protocol being promoted by various services like FriendFeed, which allows you to receive updates of RSS feeds without polling.

Basically it will allow blogs and readers to communicate real time, in a push-like method, like instant messaging, and not via pulls like the way it happens now (which can take minutes or even hours).

The cool thing about PubSubHubbub is that it works on top of existing protocols (in this case Atom) so readers and source don’t have to change much. The only thing you need is to notify a server that you published and the clients have to be subscribed to that server. Dave Winer has a good, deeper, explanation of how it works.

In this tutorial I will show you how to implement PubSubHubbub in a self-hosted installation of Wordpress, using Feedburner for feed distribution and FriendFeed as the receiving client. With this system in place, your blog posts will appear in your FriendFeed in a matter of seconds.

Read the full article →

Using Google Event Tracking to Know When You Get New Subscribers

July 10, 2009
Thumbnail image for Using Google Event Tracking to Know When You Get New Subscribers

One of the most annoying things about RSS is the lack of information we get about subscribers (something I’ve talked about in the past):

RSS is, in internet years, an old technology that was never meant to be measured. Feedburner and all other RSS measuring tools, compile data from the HTTP hits to your feed URL, and then manipulate this data to come up with an approximation of an audicence.

I’m always thinking how I could implement something that allows me to measure if new people are subscribing to my blog. Aside from fancy PHP programming to parse HTTP requests (if you don’t understand that, don’t worry) I thought if there was an easy way to use a mainstream tool to track this.

Google Analytics is one of those tools that are used by many blogs. There are easy to use plugins for all blogging platforms and if not, it’s pretty easy to setup on your own.

Analytics has a subset of very useful tools to track what users do on your site. Event tracking is one of those.

Basically event tracking allows you to send a “ping” to Analytics when users interact with a piece of your page. In this article I’ll show how to implement it.

Read the full article →

Five Truths (or Lies) of Hosting in the Cloud

May 21, 2009
Thumbnail image for Five Truths (or Lies) of Hosting in the Cloud

Dave Winer put up a great guide on how to start a server in Amazon’s cloud a few weeks back. The article takes the user’s hand and step by step you go on to create your first server on the cloud. It’s a great accomplishment (I still remember the first time I did it) and you feel like you have become a member of an exclusive club.

However, once you see that “Hello world!” screen in there, many people ask, as Daniel Pritchett does in Winer’s post: “what do I put on my new cloud server?”

Read the full article →

Installing and Configuring Memcached for PHP in Fedora

April 15, 2009

Memcached is an awesome memory object caching system that allows you to store highly requested data in RAM, across a network of servers, saving you from hitting your Mysql (or SimpleDB) database. This saves time and money for all of us.

This is a rather technical post, but I’ve done this three times already and always forget the steps to install and configure Memcached for PHP in Fedora, so if you don’t know what Memcached (or Fedora) is, you might want to skip this. But for those developers out there who are searching for this in Google, here are, step by step, how to enable Memcached for your box.

Read the full article →

Eavesdropping Great Minds

February 16, 2009

Some people are trying to explain what Twitter is.

This is my shot at it.

Imagine being able to sneak in to a room where the most brilliant scientists, marketers, newsmakers are talking to each other.

This is what Twitter allows you to do. You’re not breaking and entering, and it’s free.

Just make sure you follow people that are smarter than you. Do not follow everyone that follows you.

A lot of these people are spammers and noisemakers. What they don’t get is that Twitter is not a marketing tool. It’s not a broadcast tool.

Twitter is the ultimate smoking room without the smoking.

Read the full article →