I think you should ask Amazon to upgrade your instance, instead of backporting something that might have unexpected problems. That said you can build from sources if you have the correct packages. Sadly, the following guide wouldn't help you since python 2.7, a package that cloud-init depends to, is not available in lucid and compiling it from sources and installing it, will break your system. Is advisable to upgrade your server installation instead. The guide below would work if not for the python2.7 dependency:
Before starting:
Remember that this guide won't work. This is the procedure how to build cloud-init from sources. We need couple of build dependencies that are shared along all the packages:
sudo apt-get install dpkg-dev build-essentials cdbs debhelper po-debconf pyflakes pylint python-nose
Continue.
Build dependency problems:
All but one package that cloud-init depends to build is included in the repositories. Luckily there isn't a dependency hell behind it, since only needs python to be built:
mkdir ~/build && cd ~/build
wget http://archive.ubuntu.com/ubuntu/pool/main/m/mocker/mocker_1.0-0ubuntu3.dsc http://archive.ubuntu.com/ubuntu/pool/main/m/mocker/mocker_1.0.orig.tar.gz http://archive.ubuntu.com/ubuntu/pool/main/m/mocker/mocker_1.0-0ubuntu3.debian.tar.gz
dpkg-source -x mocker_1.0-0ubuntu3.dsc
cd mocker*
dpkg-buildpackage -us -uc -nc
Now you have a nice debfile in the parent directory. You can install it just calling:
sudo dpkg -i ../python-mocker_1.0-*.deb
Next
Building cloud-init
This is easy:
cd ~/build
wget http://archive.ubuntu.com/ubuntu/pool/main/c/cloud-init/cloud-init_0.6.3-0ubuntu1.dsc http://archive.ubuntu.com/ubuntu/pool/main/c/cloud-init/cloud-init_0.6.3.orig.tar.gz http://archive.ubuntu.com/ubuntu/pool/main/c/cloud-init/cloud-init_0.6.3-0ubuntu1.debian.tar.gz
dpkg-source -x cloud-init_0.6.3-0ubuntu1.dsc
cd cloud-init*
dpkg-buildpackage -us -uc -nc
Again, we got a nice deb file in the parent directory:
sudo dpkg -i ../cloud-init*
Done... or so I would like to say.