Alternatively if your Amazon EMR solution has demands beyond what IAM roles for

Alternatively if your amazon emr solution has demands

This preview shows page 84 - 86 out of 395 pages.

Alternatively, if your Amazon EMR solution has demands beyond what IAM roles for EMRFS provides, you can define a custom credentials provider class, which allows you to customize access to EMRFS data in Amazon S3. Creating a Custom Credentials Provider for EMRFS Data in Amazon S3 To create a custom credentials provider, you implement the AWSCredentialsProvider and the Hadoop Configurable classes. For a detailed explanation of this approach, see Securely Analyze Data from Another AWS Account with EMRFS in the AWS Big Data blog. The blog post includes a tutorial that walks you through the process 78
Image of page 84
Amazon EMR Management Guide Specifying Amazon S3 Encryption Using EMRFS Properties end-to-end, from creating IAM roles to launching the cluster. It also provides a Java code example that implements the custom credential provider class. The basic steps are as follows: To specify a custom credentials provider 1. Create a custom credentials provider class compiled as a JAR file. 2. Run a script as a bootstrap action to copy the custom credentials provider JAR file to the /usr/ share/aws/emr/emrfs/auxlib location on the cluster's master node. For more information about bootstrap actions, see (Optional) Create Bootstrap Actions to Install Additional Software . 3. Customize the emrfs-site classification to specify the class that you implement in the JAR file. For more information about specifying configuration objects to customize applications, see Configuring Applications in the Amazon EMR Release Guide . The following example demonstrates a create-cluster command that launches a Hive cluster with common configuration parameters, and also includes: A bootstrap action that runs the script, copy_jar_file.sh , which is saved to mybucket in Amazon S3. • An emrfs-site classification that specifies a custom credentials provider defined in the JAR file as MyCustomCredentialsProvider Note Linux line continuation characters (\) are included for readability. They can be removed or used in Linux commands. For Windows, remove them or replace with a caret (^). aws emr create-cluster --applications Name=Hive \ --bootstrap-actions '[{"Path":" s3://mybucket/copy_jar_file.sh ","Name":"Custom action"}]' \ --ec2-attributes '{"KeyName":" MyKeyPair ","InstanceProfile":"EMR_EC2_DefaultRole",\ "SubnetId":"subnet-xxxxxxxx","EmrManagedSlaveSecurityGroup":"sg-xxxxxxxx",\ "EmrManagedMasterSecurityGroup":"sg-xxxxxxxx"}' \ --service-role EMR_DefaultRole --enable-debugging --release-label emr-5.28.1 \ --log-uri 's3n:// my-emr-log-bucket /' --name 'test-awscredentialsprovider-emrfs' \ --instance-type=m5.xlarge --instance-count 3 \ --configurations '[{"Classification":"emrfs-site",\ "Properties":{"fs.s3.customAWSCredentialsProvider":"MyAWSCredentialsProviderWithUri"},\ "Configurations":[]}]' Specifying Amazon S3 Encryption Using EMRFS Properties Important Beginning with Amazon EMR release version 4.8.0, you can use security configurations to apply encryption settings more easily and with more options. We recommend using security configurations. For information, see Configure Data Encryption (p. 148) . The console instructions described in this section are available for release versions earlier than 4.8.0. If you
Image of page 85
Image of page 86

You've reached the end of your free preview.

Want to read all 395 pages?

  • Spring '12
  • LauraParker
  • Amazon Web Services, Amazon Elastic Compute Cloud

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors