Plivo is an open source service that offers functionality comparable to the hosted services. The authors have also made it outrageously easy to install by packaging the whole thing into two easy to run scripts. There was no EC2 AMI so I set out to create one. It turns out to be fairly straightforward, and all possible through the web console.
Choose a base AMI
The first step is to choose a base AMI. I used the Ubuntu 10.04 amd64 standard AMI in the eu-west-1 region (ami-4290a636). Then I logged in, ran the plivo install commands, waited, waited some more, waited a little longer, and all was done.
Now, to secure the AMI before publishing it, I removed the ssh keys, authorized_keys, and the bash history. This is not as simple as it sounds. I also logged in from a host that I knew would show up in the “last logged in from” section.
I logged in and ran the following commands:
sudo shred -u /etc/ssh/ssh_host_*
shred -u ~/.ssh/authorized_keys
shred -u ~/.bash_history
Now I went into the web console, selected the instance, chose the Instance Actions menu and selected Create Image (EBS AMI). Then under AMIs, I selected my new image, and changed the permissions to public.
Note that in order to take a snapshot, the instance pauses for a second. During that pause, I lose my SSH connection, and having just destroyed SSH on the machine, I cannot get back in. So I have to terminate (kill) the instance and boot it a fresh from the new AMI. This creates new SSH host keys and puts my SSH key back into authorized_keys.
I’m sure there’s a more elegant (and potentially elaborate) way of doing this. But it worked for me. It was quick and painless. Now there’s a public plivo AMI in the eu-west-1 region. I’ll look into how I get it into other regions, and if I need to pay for the storage to have it publicly available.
The result is the new public ami-acd0e1d8 in the eu-west-1 region. If you choose to test the AMI, please let me know how you get on in the comments here.