Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Amazon EC2 Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Amazon EC2 Cookbook

Amazon EC2 Cookbook

By : Sekhar Reddy
close
close
Amazon EC2 Cookbook

Amazon EC2 Cookbook

By: Sekhar Reddy

Overview of this book

Discover how to perform a complete forensic investigation of large-scale Hadoop clusters using the same tools and techniques employed by forensic experts. This book begins by taking you through the process of forensic investigation and the pitfalls to avoid. It will walk you through Hadoop’s internals and architecture, and you will discover what types of information Hadoop stores and how to access that data. You will learn to identify Big Data evidence using techniques to survey a live system and interview witnesses. After setting up your own Hadoop system, you will collect evidence using techniques such as forensic imaging and application-based extractions. You will analyze Hadoop evidence using advanced tools and techniques to uncover events and statistical information. Finally, data visualization and evidence presentation techniques are covered to help you properly communicate your findings to any audience.
Table of Contents (10 chapters)
close
close
9
Index

Creating an EC2 key pair

AWS can authenticate using the public-private key mechanism. The recommended authentication mechanism is public-private key authentication instead of passwords to remotely log in to your instances with SSH. We upload the public key to AWS, and store the private key on our local machine. If anyone has your private key, then they can easily log in to your EC2 instances. It's a best practice to store these private keys in a secure place. We can create the public and private key from our machine using tools like PuTTY Key Generator.

You should include a passphrase with the private key to prevent unauthorized persons from logging in to your EC2 instance. When you include a passphrase, you have to enter the passphrase whenever you log in to the EC2 instance. A passphrase on a private key is an extra layer of protection. If you lost your private key for an EBS-backed instance, you can regain access to your instance by executing the following steps:

  1. Stop the EBS-backed EC2 instance.
  2. Detach the root volume from EC2 instance.
  3. Launch the new EC2 instance for recovery.
  4. Attach the EC2 root volume as data volume to the previously created instance.
  5. Modify the authorized_keys file.
  6. Detach the root volume from recovery instance.
  7. Attach the root volume back to the EC2 instance.
  8. Start the instance.

How to do it…

Here, we list the commands to create a key pair and then launching the EC2 instance (using the key pair).

Creating a key pair

Use the following steps to create a key pair:

  1. Run the following command to create the key pair.

    You have to provide the key pair name. You can explicitly specify the text output for this command using the –output argument for easy cut and paste.

    $ aws ec2 create-key-pair 
    --key-name [KeyPairName]
    

    Note

    The [KeyPairName] parameter in this command is used to specify a name for the key pair.

  2. After executing the create-key-pair command, copy the entire output key into file including the following lines:
    ----BEGIN RSA PRIVATE KEY----
    -----END RSA PRIVATE KEY-----
  3. Save the file with ASCII encoding.
  4. Run the following command to create the key pair with name WebServerKeyPair.
    $ aws ec2 create-key-pair 
    --key-name WebServerKeyPair
    
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Amazon EC2 Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon