Amazon Elastic MapReduce
Developer Guide (API Version 2009-03-31)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Associate an Elastic IP Address with a Cluster

Elastic IP addresses are static IP addresses designed for dynamic cloud computing. An Elastic IP address is associated with your account, not a particular instance. You control the addresses associated with your account until you choose to explicitly release them.

You can associate one Elastic IP address with only one cluster at a time. To ensure that our customers are efficiently using Elastic IP addresses, we impose a small hourly charge when IP addresses associated with your account are not mapped to a cluster or EC2 instance. When Elastic IP addresses are mapped to an instance, they are free of charge.

For more information about using IP addresses in AWS, see Using Elastic IP Addresses section in the Amazon Elastic Compute Cloud User Guide.

To help you manage your resources, you can change the dynamically assigned IP address of the master node of your running cluster to a static Elastic IP address. Elastic IP addresses enable you to quickly remap the dynamically assigned IP address of the cluster's master node to a static IP address. An Elastic IP address is associated with your AWS account, not with a particular cluster. You control your Elastic IP address until you choose to explicitly release it. For more information about Elastic IP addresses, see Using Instance IP Addresses in the Amazon Elastic Compute Cloud User Guide.

By default, the master node of your running cluster is assigned a dynamic IP address that is reachable from the Internet. The dynamic IP address is associated with the master node of your running cluster until it is stopped, terminated, or replaced with an Elastic IP address. When a cluster with an Elastic IP address is stopped or terminated, the Elastic IP address is not released and remains associated with your AWS account.

Assign an Elastic IP Address to a Cluster

Using the Amazon EMR CLI, you can allocate an Elastic IP address and assign it to either a new or running cluster. Amazon EMR does not support assignment of Elastic IP addresses from the Amazon EMR console or through the Amazon EMR API.

After you assign an Elastic IP address to a cluster. It may take one or two minutes before the instance is available from the assigned address.

To assign an Elastic IP address to a new cluster

  • Create a cluster and add the --eip parameter.

    For information about how to create a cluster using the CLI, see Plan an Amazon EMR Cluster.

    The CLI allocates an Elastic IP address and waits until the Elastic IP address is successfully assigned to the cluster. This assignment can take up to two minutes to complete.

    Note

    If you want to use a previously allocated Elastic IP address, use the --eip parameter followed by your allocated Elastic IP address. If the allocated Elastic IP address is in use by another cluster, the other cluster loses the Elastic IP address and is assigned a new dynamic IP address.

To assign an Elastic IP address an running cluster

  1. If you do not currently have a running cluster, create a cluster.

    For information about creating a cluster, see Plan an Amazon EMR Cluster.

  2. Identify your cluster:

    Your cluster must have a public DNS name before you can assign an Elastic IP address. Typically, a cluster is assigned a public DNS name one or two minutes after launching the cluster.

    In the directory where you installed the Amazon EMR CLI, run the following from the command line. For more information, see the Command Line Interface Reference for Amazon EMR.

    • Linux, UNIX, and Mac OS X users:

      ./elastic-mapreduce --list
    • Windows users:

      ruby elastic-mapreduce --list

    The output looks similar to the following.

    j-SLRI9SCLK7UC    STARTING    ec2-75-101-168-82.compute-1.amazonaws.com
    	New Job Flow  PENDING     Streaming Job

    The response includes the cluster ID and the public DNS name. You need the cluster ID to perform the next step.

  3. Allocate and assign an Elastic IP address to the cluster:

    In the directory where you installed the Amazon EMR CLI, run the following from the command line. For more information, see the Command Line Interface Reference for Amazon EMR. If you assign an Elastic IP address that is currently associated with another cluster, the other cluster is assigned a new dynamic IP address.

    • Linux, UNIX, and Mac OS X users:

      ./elastic-mapreduce job_flow_ID --eip
    • Windows users:

      ruby elastic-mapreduce job_flow_ID --eip

    This allocates an Elastic IP address and associates it with the named cluster.

    Note

    If you want to use a previously allocated Elastic IP address, include your Elastic IP address, Elastic_IP, as follows:

    In the directory where you installed the Amazon EMR CLI, run the following from the command line. For more information, see the Command Line Interface Reference for Amazon EMR.

    • Linux, UNIX, and Mac OS X users:

      ./elastic-mapreduce job_flow_ID --eip
      												Elastic_IP
    • Windows users:

      ruby elastic-mapreduce job_flow_ID --eip
      												Elastic_IP

You have successfully assigned an Elastic IP address to your cluster.

View Allocated Elastic IP Addresses using Amazon EC2

After you have allocated an Elastic IP address, you can reuse it on other clusters. For more information about how to identify your currently allocated IP addresses, see Using Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.

Note

By default, each AWS customer has a limit of five Elastic IP addresses that can be associated with their account. If you would like to increase this limit, please submit a Request to Increase Elastic IP Address Limit (https://aws.amazon.com/support/createCase?type=service_limit_increase&serviceLimitIncreaseType=elastic-ips) to increase your maximum number of Elastic IP addresses.

Manage Elastic IP Addresses using Amazon EC2

Amazon EC2 allows you to manage your Elastic IP addresses from the Amazon EC2 console, the Amazon EC2 command line interface, and the Amazon EC2 API.

For more information about using Amazon EC2 to create and manage your Elastic IP addresses, see Using Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.