Capture web page screenshots headless

For a while now I have been using the Amazon cloud to render web page previews for posts in Feederator. This solution is running in Amazons new free “beginner” quota. For a low load this works quite well, but it never worked to create a thumbnail for all incoming items. I guess it wasn’t working reliably because for every call a virtual framebuffer has to be started, then firefox, then the screenshot and so on… From time to time the available ports to the X server would run out…
So I was looking for another affordable and fast solution. So I found this post and followed the instructions to the letter: It worked until I wanted to compile the moz-headless-screenshot programm itself. I got the following error:

/usr/lib64/ undefined reference to `CERT_DistNamesFromCertList@NSS_3.12.6′
/usr/lib64/ undefined reference to `CERT_DupDistNames@NSS_3.12.6′
/usr/lib64/ undefined reference to `NSS_SecureMemcmp@NSSUTIL_3.12.5′
collect2: ld returned 1 exit status
make: *** [moz-headless-screenshot] Error 1

I contacted Ted, the writer of the above mentioned blog post and he told me

The mozconfig file in my directions probably contains a line like
“–enable-system-nss”. Try removing that, and the build will use the
in-tree copy of NSS instead.

I then removed the nss library references in his Makefile and recompiled and it worked. Now I’m trying to figure out, how I can package the whole stuff to run it on the cloud…

Related:  A word about Feederator...