Perl Library for Amazon Elastic MapReduce

items>Perl Library for Amazon Elastic MapReduce
Community Contributed Software

  • Amazon Web Services provides links to these packages as a convenience for our customers, but software not authored by an "@AWS" account has not been reviewed or screened by AWS.
  • Please review this software to ensure it meets your needs before using it.

Perl Library for Amazon Elastic MapReduce


Submitted By: Elena@AWS
AWS Products Used: Amazon Elastic MapReduce
Language(s): Perl
License: Apache License 2.0
Created On: April 2, 2009 7:49 AM GMT
Last Updated: April 8, 2010 4:48 PM GMT

About this Library

  • Based on the 2009-03-31 API version.

What's New?

  • 2010-04-08: Added support for bootstrap actions.
  • 2009-04-21: Initial release


  • Amazon ElasticMap Reduce account (
  • Perl 5.6.0 or newer (
  • Depending on the version of PERL you are using, you may need to install additional packages. To install additional packages, run following command:
    • perl -MCPAN -e 'install Digest::SHA'
    • perl -MCPAN -e 'install XML::Simple'
    • perl -MCPAN -e 'install Bundle::LWP'
    • perl -MCPAN -e 'install Crypt::SSLeay'

Package Content

Directory Overview
src Source distribution of library.

Quick Start

Library comes with code samples for each available service API. To get started with the library, follow these steps:
  1. Extract the file into a working directory.
  2. Edit desired sample. For example: src/Amazon/ElasticMapReduce/Samples/

    • Set AWS Access Key ID and AWS Secret Access Key
    •  my $AWS_ACCESS_KEY_ID        = "<Your Access Key ID>";
       my $AWS_SECRET_ACCESS_KEY    = "<Your Secret Access Key>";

    • Set request parameters. For example, find following pre-generated snippet:
    •  use Amazon::ElasticMapReduce::Model::DescribeJobFlowsRequest;
       # @TODO: set request. request can be passed as Amazon::ElasticMapReduce::Model::DescribeJobFlowsRequest
       # object or hash of parameters
       # invokeDescribeJobFlows($service, $request);

    • And set request:
    •  use Amazon::ElasticMapReduce::Model::DescribeJobFlowsRequest;
       my $request = Amazon::ElasticMapReduce::Model::DescribeJobFlowsRequest->new;
       invokeDescribeJobFlows($service, $request);

  3. Run DescribeJobFlows sample:
  4.    perl src/Amazon/ElasticMapReduce/Samples/
  5. You should see the output similar to the following:

  6.     DescribeJobFlowsResponse

  7. Experiment with samples. When ready, install library in the perl include path and use it.


You can use alternative hash-based interface with the library. For example, instead of:

    my $request = Amazon::ElasticMapReduce::Model::DescribeJobFlowsRequest->new;
    my $response = $service->describeJobFlows($request);
You can write:
    my $response = $service->describeJobFlows({});

Making Requests to a Different Region

To make the service call to a different region, instantiate the client with the configuration object, and pass the region-specific endpoint. For example:

 my $service = Amazon::ElasticMapReduce::Client->new
        {"ServiceURL" => ""});

See the Amazon Elastic MapReduce Developer Guide for a complete list of region endpoints.

Comments, Questions or Feedback

If you have any comments, questions or feedback on the library, please start discussion here.


Additional examples?
Could you provide an example of using this library that includes issuing a job? I would like to understand how to fully populate the $request object, which is not covered here.
Adam O'Donnell on October 11, 2009 6:07 PM GMT
We are temporarily not accepting new comments.
©2017, Amazon Web Services, Inc. or its affiliates. All rights reserved.