Book Image

AWS Networking Cookbook

By : Satyajit Das, Jhalak Modi
Book Image

AWS Networking Cookbook

By: Satyajit Das, Jhalak Modi

Overview of this book

This book starts with practical recipes on the fundamentals of cloud networking and gradually moves on to configuring networks and implementing infrastructure automation. This book then supplies in-depth recipes on networking components like Network Interface, Internet Gateways, DNS, Elastic IP addresses, and VPN CloudHub. Later, this book also delves into designing, implementing, and optimizing static and dynamic routing architectures, multi-region solutions, and highly available connectivity for your enterprise. Finally, this book will teach you to troubleshoot your VPC's network, increasing your VPC's efficiency. By the end of this book, you will have advanced knowledge of AWS networking concepts and technologies and will have mastered implementing infrastructure automation and optimizing your VPC.
Table of Contents (10 chapters)

Configuring AWS CLI

The AWS CLI is a collection of tools for managing AWS services from the command-line. We can create the script using CLI to automate AWS resource management. AWS CLI can be installed with an installer (Windows) or by using a pip or a package manager for Python.

Getting ready

Keep the user access key details handy that we created in the earlier section.

How to do it...

Here are the steps to follow:

You should have a working version of Python 2.6.5+ or 3.5+ in your system. Otherwise, install python in your system first. Check your Python installation:

$ python --version

Follow the given steps to install AWS CLI using bundled installer:

Download the AWS CLI bundled installer. For Linux flavor the command is as follows:

$ cURL "https://s3.amazonaws.com/aws-cli/aws-cli-bundle.zip" - "awscli-bundle.zip"

The package need to be unzipped. For Linux flavor the command is as following:

$sudo ./awscli-bundle/install –i /usr/local/aws -b /usr/local/bin/aws
  • Configuration:

Type aws configure in command prompt or shell depending on your machine operating system. It will ask for the required details. Provide AWS Access Key ID and AWS Secret Access Key that were generated while creating an admin user. You can mention us-east-1 as the default region or choose any other region from the list given in the screenshot following and JSON as Default output format. Don't worry if you don't understand region for now. We shall take a detailed look at in the following section.

Configure AWS CLI

You are all set for creating, modifying and managing networking components through API/CLI call in AWS depending on AWS privilege that your user have.