I’m trying to write a Perl script that will run as a mapper under Elastic MapReduce’s Streaming capability. I’m trying to use Net::Amazon::S3 (or the supposedly more portable Amazon::S3) to do some extra I/O of files from and to S3. That module is not on the default AMI, so I’m trying to use CPAN in a bootstrap-action script to install it. The bootstrap script currently contains:
perl -MCPAN -e ‘CPAN::Shell->install(Amazon::S3)’
however, after 15 minutes the bootstrap action has still not completed, so I assume it is waiting for some kind of input. I’ve looked around but have not found any examples of bootstrap-action scripts that load Perl modules. Can someone advise me on that?
Thanks in advance…
Found an easier and faster way. It looks like most CPAN modules are also available by apt-get. I have a bootstrap action script that now says:
Note that this does not load the S3 module I asked about in the original question. I have changed my code so that I don’t need that capability anymore. However, Net::Amazon::S3 is available as libnet-amazon-s3-perl so
should do the job.
Credit goes to http://www.deepakg.com/prog/2009/01/cpan-modules-on-ubuntu-apt-get-vs-perl-mcpan/ for the info.