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

Preparing AWS CLI tools

AWS CLI is a set of unified command-line tools to work with multiple AWS services. Using AWS CLI tools you can manage EC2 resources (such as instances, security groups, and volumes) and your VPC resources (such as VPCs, subnets, route tables, and Internet gateways).

How to do it…

In the following two sections, we list the set of instructions required to accomplish this on Linux and Windows/Mac platforms.

Getting access key ID and secret access key

You need AWS access key ID and AWS secret access key to access AWS services. Instead of generating these credentials from the root account, it's always best practice to use IAM users. You should save these credentials in a secure location. If you lose these keys, you must delete the access key and then create a new key.

You can get the AWS credentials from AWS management portal by following these steps:

  1. Log in to the AWS management portal using your AWS username and password.
  2. Select account name from top menu at the right corner in the console.
  3. Select security credentials.
  4. Click on access keys (access key ID and secret access key).
  5. Click on the Create New Access Key button.
  6. Click on Download Key File, which will download the file. If you do not download the key file now, you will not be able to retrieve your secret access key again.
  7. Copy this key file to a secure location.

    Note

    Don't upload your code base with AWS security credentials to public code repositories such as GitHub. Attackers are scraping GitHub for AWS credentials. If anyone gets access to these credentials, they can misuse your AWS account.

Installing AWS CLI using pip in Linux

We can use the pip tool to install the Python packages.

  1. Before installing Python, please check whether Python is already installed on your machine or not using the following command. If Python is already installed on your machine, then skip to the pip installation step.
    $ python --help
    
  2. Start by installing Python. Download the compressed TAR archive file from the Python site, and then install it using the commands listed below. The following steps target the apt-based Linux distributions:
    $ sudo apt-get install gcc
    $ wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
    $ tar -zxvf Python-2.7.8.tgz
    $ cd Python-2.7.8
    $ ./configure
    $ make
    $ sudo make install
    
  3. Next, check the Python installation:
    $ python –help
    
  4. Before installing pip, please check whether pip is already installed on your machine or not by using the following command. If pip is already installed on your machine, then skip to the awscli installation step:
    $ pip –help
    
  5. Move on to installing pip:
    $ sudo apt-get install pip
    
  6. Then install AWS CLI. If you have already installed awscli, you can upgrade the installation using the –upgrade option.
    $ sudo pip install awscli
    
  7. Next, configure AWS CLI.

    On the command prompt, type the following command, which will prompt for the AWSAccessKey ID, AWSSecretKey, default AWS region, and default output format.

    $ sudo aws configure
    
  8. Finally, check the installation by getting regions list:
    $ sudo aws ec2 describe-regions
    

Installing AWS CLI using pip in Windows/Mac

We can use the pip tool to install the Python packages.

  1. Before installing Python, please check whether Python is already installed on your machine or not by using the following command. If Python is already installed on your machine, then skip to the pip installation step.
    $ python –help
    
  2. Start by installing Python. Download the installer from the following URL and install Python by using that installer: https://www.python.org/downloads/.
  3. Check your Python installation:
    $ python –help
    
  4. Before installing pip, check whether pip is already installed on your machine or not by using the following command. If pip is already installed on your machine, skip to the awscli installation step.
    $ pip –help
    
  5. In the next step, we install pip. Download and run the installation script from https://bootstrap.pypa.io/get-pip.py. After that, run the following command:
    $ python get-pip.py
    
  6. Install AWS CLI. If you have already installed awscli, you can upgrade the installation using the –upgrade option.
    $ pip install awscli
    
  7. Next, we configure AWS CLI. Execute the following command from the command prompt.
    $ aws configure
    

    This command will then prompt you for the AWSAccessKey ID, AWSSecretKey, default AWS region, and default output format.

  8. Check the installation by getting the regions list:
    $ aws ec2 describe-regions
    
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