Warning We strongly recommend that you choose to update all installed packages

Warning we strongly recommend that you choose to

This preview shows page 101 - 104 out of 395 pages.

Warning We strongly recommend that you choose to update all installed packages on reboot when you specify a custom AMI. Choosing not to update packages creates additional security risks. Using the AWS Management Console, you can select the option to disable updates when you choose Custom AMI ID . Using the AWS CLI, you can specify --repo-upgrade-on-boot NONE along with --custom-ami-id when using the create-cluster command. Using the Amazon EMR API, you can specify NONE for the RepoUpgradeOnBoot parameter. 95
Image of page 101
Amazon EMR Management Guide Using a Custom AMI Creating a Custom Amazon Linux AMI from a Preconfigured Instance The basic steps for pre-installing software and performing other configurations to create a custom Amazon Linux AMI for Amazon EMR are as follows: Launch an instance from the base Amazon Linux AMI. Connect to the instance to install software and perform other customizations. Create a new image (AMI snapshot) of the instance you configured. After you create the image based on your customized instance, you can copy that image to an encrypted target as described in Creating a Custom AMI with an Encrypted Amazon EBS Root Device Volume (p. 97) . Tutorial: Creating an AMI from an Instance with Custom Software Installed To launch an EC2 instance based on the most recent Amazon Linux AMI 1. Use the AWS CLI to run the following command, which creates an instance from an existing AMI. Replace MyKeyName with the key pair you use to connect to the instance and MyAmiId with the ID of an appropriate Amazon Linux AMI. For the most recent AMI IDs, see Amazon Linux AMI . 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 ec2 run-instances --image-id MyAmiID \ --count 1 --instance-type m5.xlarge \ --key-name MyKeyName --region us-west-2 The InstanceId output value is used as MyInstanceId in the next step. 2. Run the following command: aws ec2 describe-instances --instance-ids MyInstanceId The PublicDnsName output value is used to connect to the instance in the next step. To connect to the instance and install software 1. Use an SSH connection that lets you run shell commands on your Linux instance. For more information, see Connecting to Your Linux Instance Using SSH in the Amazon EC2 User Guide for Linux Instances . 2. Perform any required customizations. For example: sudo yum install MySoftwarePackage sudo pip install MySoftwarePackage To create a snapshot from your customized image After you customize the instance, use the create-image command to create an AMI from the instance. 96
Image of page 102
Amazon EMR Management Guide Using a Custom AMI aws ec2 create-image --no-dry-run --instance-id MyInstanceId --name MyEmrCustomAmi The imageID output value is used when you launch the cluster or create an encrypted snapshot.
Image of page 103
Image of page 104

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