How can I create a static private IP address and associate it with the master node of an Amazon EMR cluster using a bootstrap action?

  1. Confirm that permissions for EMR_EC2_DefaultRole and ec2:AssignPrivateIpAddresses are allowed in your AWS Identity and Access Management (IAM) policy.
  2. Sign in to GitHub.
  3. Download the script from AWS Labs.
  4. Save the script in an Amazon Simple Storage Service (Amazon S3) bucket.
  5. Specify the script as a custom bootstrap action while launching an Amazon EMR cluster. You can also run the script as an Amazon EMR step. The script requires an argument that is a private IP address from the CIDR range of your subnet. The script attaches that private IP address to the network interface (eth0) of the master node. The script also configures the network settings to redirect all traffic from the secondary IP address to the primary IP address.
  6. To find the new IP address, open the Amazon Elastic Compute Cloud (Amazon EC2) console. Then, select the EC2 instance that is acting as the master node of the Amazon EMR cluster. The new IP address appears on the Description tab, in the Secondary private IPs field.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2018-08-10

Updated: 2019-02-07