AWS Administration – The Definitive Guide - Yohan Wadia - E-Book

AWS Administration – The Definitive Guide E-Book

Yohan Wadia

0,0
39,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Learn to design, build, and manage your infrastructure on the most popular of all the Cloud platforms—Amazon Web Services

About This Book

  • Learn how to leverage various Amazon Web Services (AWS) components and services to build a secure, reliable, and robust environment to host your applications on
  • Deep dive into the core AWS service offerings with hands-on tutorials, real-world use case scenarios, and best practices
  • A self-paced, systematic, and step-by-step guide to learning and implementing AWS in your own environment

Who This Book Is For

This book is for those who want to learn and leverage AWS. Although no prior experience with AWS is required, it is recommended that you have some hands-on experienceofLinux, Web Services, and basic networking

What You Will Learn

  • A brief introduction to Cloud Computing and AWS accompanied by steps to sign up for your first AWS account
  • Create and manage users, groups, and permissions using AWSS Identity and Access Management services
  • Get started with deploying and accessing EC2 instances, working with EBS Volumes and Snapshots
  • Customize and create your very own Amazon Machine Image
  • Design and deploy your instances on a highly secured, network isolated environment using Amazon VPC
  • Effectively monitor your AWS environment using specialized alarms, custom monitoring metrics, and much more
  • Explore the various benefits of Database-as-a-Service offerings and leverage them using Amazon RDS and Amazon DynamoDB
  • Take an in-depth look at what's new with AWS, including EC2 Container Service and Elastic File System

In Detail

AWS is at the forefront of Cloud Computing today. Many businesses are moving away from traditional datacenters and toward AWS because of its reliability, vast service offerings, lower costs, and high rate of innovation. Because of its versatility and flexible design, AWS can be used to accomplish a variety of simple and complicated tasks such as hosting multitier websites, running large scale parallel processing, content delivery, petabyte storage and archival, and lots more.

Whether you are a seasoned sysadmin or a rookie, this book will provide you with all the necessary skills to design, deploy, and manage your applications on the AWS cloud platform. The book guides you through the core AWS services such as IAM, EC2, VPC, RDS, and S3 using a simple real world application hosting example that you can relate to. Each chapter is designed to provide you with the most information possible about a particular AWS service coupled with easy to follow hands-on steps, best practices, tips, and recommendations.

By the end of the book, you will be able to create a highly secure, fault tolerant, and scalable environment for your applications to run on.

Style and approach

This in-depth and insightful guide is filled with easy-to-follow examples, real-world use cases, best practices, and recommendations that will help you design and leverage AWS.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 433

Veröffentlichungsjahr: 2016

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

AWS Administration – The Definitive Guide
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Instant updates on new Packt books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Introducing Amazon Web Services
What is cloud computing?
Cloud computing features and benefits
Cloud computing use cases
Introducing Amazon Web Services
AWS architecture and components
Regions and availability zones
AWS platform overview
Compute
Storage
Databases
Networking
Distributed computing and analytics
Content distribution and delivery
Workflow and messaging
Monitoring
Identity and access management
Getting started with AWS
Introducing the AWS Management Console
Getting started with AWS CLI
Plan of attack!
Summary
2. Security and Access Management
Security and clouds
Is AWS really secure
Shared responsibility model
Identity and Access Management
Business use case scenario
Getting started with the IAM Console
Creating users and groups
Understanding permissions and policies
Creating and assigning policies
Managing access and security using the AWS CLI
Planning your next steps
Recommendations and best practices
Summary
3. Images and Instances
Introducing EC2!
EC2 use cases
Introducing images and instances
Understanding images
Amazon Linux AMI
Understanding instances
EC2 instance pricing options
On-demand instances
Reserved instances
Spot instances
Working with instances
Stage 1 – choose AMI
Stage 2 – choose an instance type
Stage 3 – configure instance details
Stage 4 – add storage
Stage 5 – tag instances
Stage 6 – configure security groups
Stage 7 – review instance launch
Connecting to your instance
Configuring your instances
Launching instances using the AWS CLI
Stage 1 – create a key pair
Stage 2 – create a security group
Stage 3 – add rules to your security group
Stage 4 – launch the instance
Cleaning up!
Planning your next steps
Recommendations and best practices
Summary
4. Security, Storage, Networking, and Lots More!
An overview of security groups
Understanding EC2 networking
Determining your instances IP addresses
Working with Elastic IP addresses
Create an Elastic IP address
Allocating Elastic IP addresses
Disassociating and releasing an Elastic IP address
Understanding EBS volumes
EBS volume types
Getting started with EBS Volumes
Creating EBS volumes
Attaching EBS volumes
Accessing volumes from an instance
Detaching EBS volumes
Managing EBS volumes using the AWS CLI
Backing up volumes using EBS snapshots
Planning your next steps
Recommendations and best practices
Summary
5. Building Your Own Private Clouds Using Amazon VPC
An overview of Amazon VPC
VPC concepts and terminologies
Subnets
Security groups and network ACLs
Routing tables
VPC endpoints
Internet Gateways
NAT instances
DNS and DHCP Option Sets
VPC limits and costs
Working with VPCs
VPC deployment scenarios
Getting started with the VPC wizard
Viewing VPCs
Listing out subnets
Working with route tables
Listing Internet Gateways
Working with security groups and Network ACLs
Launching instances in your VPC
Creating the web servers
Creating the database servers
Planning next steps
Best practices and recommendations
Summary
6. Monitoring Your AWS Infrastructure
An overview of Amazon CloudWatch
Concepts and terminologies
Metrics
Namespaces
Dimensions
Time stamps and periods
Units and statistics
Alarms
CloudWatch limits and costs
Getting started with CloudWatch
Monitoring your account's estimate charges using CloudWatch
Monitoring your instance's CPU Utilization using CloudWatch
Monitoring your instance's memory and disk utilization using CloudWatch Scripts
Creating CloudWatch access roles
Installing the CloudWatch monitoring scripts
Viewing the custom metrics from CloudWatch
Monitoring logs using CloudWatch Logs
CloudWatch Log concepts and terminologies
Getting Started with CloudWatch Logs
Viewing the logs
Creating metric filters and alarms
Planning your next steps
Recommendations and best practices
Summary
7. Manage Your Applications with Auto Scaling and Elastic Load Balancing
An overview of Auto Scaling
Auto scaling components
Auto scaling groups
Launch configurations
Scaling plans
Introducing the Elastic Load Balancer
Creating your first Elastic Load Balancer
Step 1 – Defining the Load Balancer
Step 2 – Assign security groups
Step 3 – configure security settings
Step 4 – Configure Health Check
Step 5 – Add EC2 instances
Step 6 – Add tags
Step 7 – Review and Create
Getting started with Auto Scaling
Creating the Launch Configuration
Step 1 – Choose AMI
Step 2 – Choose Instance type
Step 3 – Configure details
Step 4 – Add storage
Step 5 – Configure Security Group
Step 6 – Review
Creating the Auto Scaling Group
Step 1 – Configure Auto Scaling group details
Step 2 – Configure scaling policies
Step 3 – Configure notifications
Step 4 – Configure tags
Step 5 – Review
Verifying and testing Auto Scaling
Suspend, resume and delete Auto Scaling
Planning your next steps
Recommendations and best practices
Summary
8. Database-as-a-Service Using Amazon RDS
An overview of Amazon RDS
RDS instance types
Multi-AZ deployments and Read Replicas
Working with Amazon RDS
Getting started with MySQL on Amazon RDS
Creating a MySQL DB instance
Step 1 – Select Engine
Step 2 – Production?
Step 3: Specify DB Details
Step 4: Configure Advanced Settings
Connecting remotely to your DB instance
Testing your database
Modifying your DB instances
Backing up DB instances
Creating Read Replicas and promoting them
Logging and monitoring your DB instance
Cleaning up your DB instances
Planning your next steps
Recommendations and best practices
Summary
9. Working with Simple Storage Service
Introducing Amazon S3
Getting started with S3
Creating buckets
Uploading your first object to a bucket
Viewing uploaded objects
Accessing buckets and objects using S3CMD
Managing an object's and bucket's permissions
Using buckets to host your websites
S3 events and notification
Bucket versioning and lifecycle management
Cross-Region Replication
Planning your next steps
Recommendations and best practices
Summary
10. Extended AWS Services for Your Applications
Introducing Amazon Route53
Working with Route53
Creating hosted zones
Getting started with traffic flow
Configuring health checks
Content delivery using Amazon CloudFront
Getting started with distributions
CloudFront recommendations and best practices
What's new in AWS?
Elastic Container Service
Elastic File System
Database migration made easy with Database Migration Service
Go serverless with AWS Lambda
Resources, recommendations, and best practices
Summary
Index

AWS Administration – The Definitive Guide

AWS Administration – The Definitive Guide

Copyright © 2016 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: February 2016

Production reference: 1080216

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78217-375-5

www.packtpub.com

Credits

Author

Yohan Wadia

Reviewer

Paul Deng

Commissioning Editor

Kunal Parikh

Acquisition Editor

Rahul Nair

Content Development Editor

Anish Dhurat

Technical Editor

Pranjali Mistry

Copy Editor

Charlotte Carneiro

Project Coordinator

Bijal Patel

Proofreader

Safis Editing

Indexer

Monica Ajmera Mehta

Production Coordinator

Nilesh Mohite

Cover Work

Nilesh Mohite

About the Author

Yohan Wadia is a client-focused virtualization and cloud expert with 6 years of experience in the IT industry.

He has been involved in conceptualizing, designing, and implementing large-scale solutions for a variety of enterprise customers based on VMware vCloud, Amazon Web Services, and Eucalyptus Private Cloud.

His community-focused involvement also enables him to share his passion for virtualization and cloud technologies with peers through social media engagements, public speaking at industry events, and through his personal blog—yoyoclouds.com

He is currently working with an IT services and consultancy company as a Cloud Solutions Lead and is involved in designing and building enterprise-level cloud solutions for internal as well as external customers. He is also a VMware Certified Professional and a vExpert (2012 and 2013).

I wish to dedicate this book to both my loving parents, Ma and Paa. Thank you for all your love, support, encouragement, and patience. I would also like to thank the entire Packt Publishing team, especially Ruchita Bhansali, Athira Laji, and Gaurav Sharma, for their excellent guidance and support.

And finally, a special thanks to one of my favorite bunch of people: the amazing team of developers, support staff, and engineers who work at AWS for such an "AWSome" cloud platform!

Not all those who wander are lost.

- J. R. R. Tolkien

About the Reviewer

Paul Deng is a senior software engineer with over 8 years of experience in end-to-end IoT app design and development, including embedded devices, large-scale machine learning, cloud, and web apps.

Paul holds software algorithm patents and was a finalist of Shell Australian Innovation Challenge 2011. He has authored several publications on IoT and cloud.

He lives in Melbourne, Australia, with his wife Cindy and son Leon. Visit his website at http://dengpeng.de to see what he is currently exploring and to learn more about him.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Free access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.

Instant updates on new Packt books

Get notified! Find out when new books are published by following @PacktEnterprise on Twitter or the Packt Enterprise Facebook page.

Preface

Cloud computing has definitely matured and evolved a lot ever since its conception. Practically all major industries and top fortune 500 companies today run their application workloads on clouds to reap all sorts of benefits, ranging from reduced costs, better availability of their applications, and easier manageability to on-demand scalability, and much more! At the forefront of this cloud innovation is a market leader like no other: Amazon Web Services (AWS).

AWS provides a ton of easy-to-use products and services that you can leverage to build, host, deploy, and manage your applications on the cloud. It also provides a variety of ways to interact with these services, such as SDKs, APIs, CLIs, and even a web-based management console.

This book is a one stop shop where you can find all there is to getting started with the core AWS services, which include EC2, S3, RDS, VPCs, and a whole lot more! If you are a sysadmin or an architect or someone who just wants to learn and explore various aspects of administering AWS services, then this book is the right choice for you! Each chapter of this book is designed to help you understand the individual services' concepts as well as gain hands-on experience by practicing simple and easy to follow steps. The chapters also highlight some key best practices and recommendations that you ought to keep in mind when working with AWS.

What this book covers

Chapter 1, Introducing Amazon Web Services, covers the introductory concepts and general benefits of cloud computing along with an overview of Amazon Web Services and its overall platform. The chapter also walks you through your first AWS signup process, and finally ends with the configuration of the AWS CLI.

Chapter 2, Security and Access Management, discusses the overall importance of security and how you can achieve it using an AWS core service known as Identity and Access Management (IAM). The chapter walks you through the steps required to create and administer AWS users, groups, as well as how to create and assign permissions and policies to them.

Chapter 3, Images and Instances, provides hands-on knowledge about EC2 instances and images, and how you can create and manage them using both the AWS Management Console as well as the AWS CLI.

Chapter 4, Security, Storage, Networking and Lots More!, discusses some of the key aspects that you can leverage to provide added security for your applications and instances. The chapter also provides an in-depth overview of EC2 instance storage as well as networking options followed by some recommendations and best practices.

Chapter 5, Building Your Own Private Clouds Using Amazon VPC, introduces you to the concept and benefits provided by AWS Virtual Private Cloud (VPC) service. The chapter also provides an in-depth look at various VPC deployment strategies and how you can best leverage them for your own environments.

Chapter 6, Monitoring Your AWS Infrastructure, covers AWS's primary monitoring service, called as Amazon CloudWatch. In this chapter, you will learn how to effectively create and manage alerts, loggings, and notifications for your EC2 instances, as well as your AWS environment.

Chapter 7, Manage Your Applications with Auto Scaling and Elastic Load Balancing, discusses some of the key AWS services that you should leverage to create a dynamically scalable and highly available web application.

Chapter 8, Database-as-a-Service Using Amazon RDS, provides an in-depth look at how you can effectively design, create, manage, and monitor your RDS instances on AWS.

Chapter 9, Working with Simple Storage Service, provides practical knowledge and design considerations that you should keep in mind when working with Amazon's infinitely scalable and durable object storage known as Amazon S3.

Chapter 10, Extended AWS Services for Your Application, provides a brief overview of add-on AWS services that you can leverage for enhancing your applications' performance and availability.

What you need for this book

To start using this book, you will need the following set of software installed on your local desktop:

An SSH client such as Putty, a key generator such as PuttyGen, and a file transferring tool such as WinSCPAny modern web browser, preferably Mozilla Firefox

Who this book is for

This book is intended for any and all IT professionals who wish to learn and implement AWS for their own environments and application hosting. Although no prior experience or knowledge is required, it will be beneficial for you to have basic Linux knowledge as well as some understanding of networking concepts and server virtualization.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include directive."

A block of code is set as follows:

{ "Id": "Policy1448937262025", "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt1448937260611", "Effect": "Allow", "Principal": "*", } }

Any command-line input or output is written as follows:

CREATE TABLE doge(idint(11) NOT NULL auto_increment,namevarchar(255),description text,

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Next, select the Launch DB Instance button to bring up the DB Launch Wizard:"

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.

Chapter 1. Introducing Amazon Web Services

Being in the IT industry, we all have gone through the long and tedious process of procuring new infrastructure for our data centers at one time or another. Let's be honest, it is not a task for the faint-hearted At a minimum, a brand new server can take weeks if not months to get delivered from its date of ordering, and this is too heavily dependent on a lot of external factors which, most of the time, are not in our control. Even if the new server comes in on time, there is the additional burden of prepping the rack, clearing space for the new resources, cabling, cooling, mounting, installation of software, configuration, and the list just keeps on going on for another mile. Putting the server and storage on one side, the same can also apply for networking, applications, software, and a whole lot of other things. But what if all this was to change? What if tomorrow, you could simply jump start your business or scale your application to thousands of servers, all with the simple click of a button? Seems farfetched, doesn't it, but in reality, this is possible today with a little help from something called as cloud computing.

Cloud computing has definitely evolved a lot over the years, and today it has become almost a mainstream part of our lives. Everything from storing large amounts of data, to having burst compute capacity at your fingertips and having enterprise software applications available on demand any time anywhere are just some of the key benefits that clouds provide today. At the helm of this new way of computing is Amazon Web Services (AWS).

In this chapter, we are going to look at some of the key features and benefits provided by cloud computing in general along with few interesting enterprise use cases. Later on, you will learn a bit more about Amazon Web Services and its core components, and finally have a look at how to sign up and get started with AWS.

What is cloud computing?

Cloud computing has become one of the most discussed topics over the last few years, but what does it actually mean? Why is it important for you and your business? Let's take a quick look at what cloud computing actually is and how you as an end user can benefit from it.

NIST defines cloud computing as a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (for example, networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. Was that a bit confusing? Let's break it down to understand it a little bit better:

On demand: Contrary to traditional IT data centers where requesting and obtaining resources for your applications used to take weeks, the same resources can be made available on an on-demand basis in the cloud, without requiring any human interventions at all.Network access: One of the key features of any cloud is that all of its resources can be accessed over the Internet or a network in general. This makes it really easy for the end user to access and leverage cloud from heterogeneous devices such as laptops, workstations, mobile phones, and so on.Shared pool: We must have all experienced the silo-based infrastructure setup in our traditional IT data centers. Silos of resources are often created by individual departments where each application gets overcommitted resources, which are more than often wasted. In case of the cloud, IT resources such as compute, storage, and network are pooled and abstracted together from the end user. This pooling enables the cloud to dynamically provide resources to its tenants as and when required without the end user having any knowledge of where their application will actually reside in a cluster or a rack.Rapid provisioning: Rapid provisioning or elasticity as it is referred to nowadays, is the ability of a cloud to scale its resources either horizontally (scale out) or vertically (scale up) on an automated basis. This elasticity provides end users with a lot of flexibility and control over their resources and how they get consumed.

Cloud computing features and benefits

Okay, so now we know what cloud computing really means, but why should you as an end user use it? How are you and your organization going to benefit from it? Let's look at some of the key benefits and features cloud computing has to offer:

Lower costs: Cloud computing does not have any upfront costs. Capital expenditure is virtually zero as the entire necessary infrastructure and resources are already made available and ready for use by the Cloud provider. All the end user has to do is consume these resources and pay only for what they use.

This also reduces the overall maintenance costs as well. Since the organization now has less hardware to manage, it doesn't necessarily have to bother about its server, network, and storage capacity or have a full time staff to manage them.

Self-service: Cloud computing provides a simple, centralized, self-service-based model that end users can use to interact with the cloud platform. The interaction can be in terms of performing simple tasks, such as spinning up new compute resources, adding more storage resources at runtime, or more complex ones, such as scheduling resources and so on. This ensures that the end user can leverage and consume any of the cloud's resources on an on-demand basis.Faster time to markets: Unlike traditional IT, compute resources can be brought up in a cloud in a matter of minutes as compared to the weeks it used to take. This provides the end users with the ability to deploy new applications much faster, thus decreasing overall time to markets and reducing management overheads and costs.Scale as required: The best part of using the cloud is that your backend resources can grow as your application grows. This means that you are never lagging behind with your application's needs and demands, you are always scaling with your application's needs.

Cloud computing use cases

With such features and benefits it is easy to see why there has been such a boom in the overall adoption and utilization of the cloud. Let's take a quick look at some interesting real-world use cases where your organization can leverage clouds:

Website hosting: Perhaps the most common of the use cases, you as an end user can leverage cloud to build and host your websites with relative ease. The cloud enables your website to scale up and down dynamically as per its demands.Storage and sharing: The cloud offers virtually unlimited storage capacity that can used to store and share anything, from documents, media, files, and so on. Dropbox and Google Drive are classic examples of cloud being used as a storage and sharing medium.Disaster recovery (DR): This is a more upcoming use case with clouds as more and more companies are now realizing that it is way easier and cost efficient to host a disaster recovery environment on the cloud, rather than hosting and managing a DR site of its own. Organizations can spin up failover environments on the cloud in a matter of minutes, test the failover and then shut down the entire stack. This helps save on the costs and also reduces overall management overheads and failover time.Dev/test: Dev and test are way easier to set up and run on clouds as the entire development and test environments can be built up, tested, and torn back down quickly as per requirements.Short term projects/ advertising: Similar to the Dev/test scenario, the cloud can also be leveraged to perform a variety of short-term projects/proof of concepts. A classic example is the advertising campaigns hosted on the cloud that are created for a very short duration of time, however, they need a global presence to reach out to a wider set of audiences.Big data analytics: Organizations leverage the cloud's scalability and on-demand infrastructure to capture and perform real-time analytics and data mining on extremely large datasets (big data).

Introducing Amazon Web Services

Now, that you clearly understand what cloud computing is all about and what it can do for you, let's get to know the main topic of this book—Amazon Web Services—a little better.

Amazon Web Services or AWS is a comprehensive public cloud computing platform that offers a variety of web-based products and services on an on-demand and pay-per-use basis. AWS was earlier a part of the e-commerce giant Amazon.com, and it wasn't until 2006 that AWS became a separate entity of its own. Today, AWS operates globally with data centers located in USA, Europe, Brazil, Singapore, Japan, China, and Australia. AWS provides a variety of mechanisms, using which the end users can connect to and leverage its services, the most common form of interaction being the web-based dashboard also called as AWS Management Console.

So how does the whole thing work? Well, it is very easy to understand when you compare the way AWS works with a power and utilities company. AWS offers its customers certain services just as a power company would to its consumers. You as an end user simply consume the electricity without having to worry about the underlying necessities such as generator costs, cabling, and so on. At the end of the month, all you get is a bill based on your electricity consumption and that's it! In a similar way, AWS provides its products such as compute, storage, and networking all as a service, and you only have to pay for the amount of service that you use. No upfront costs or heavy investments whatsoever!

The other important thing worth mentioning here is that AWS allows organizations to use their own operating systems, databases, and programming/architecting models as well, without requiring any major re-engineering. This provides a lot of flexibility and cost optimization to organizations as they get to operate and work with platforms that they are familiar with. This, accompanied with AWS's massively scalable and highly available infrastructure, ensures that your applications and data remain secure and available for use no matter what.

AWS architecture and components

Before we begin with the actual signup process, it is important to take a look at some of the key architecture and core components of services offered by AWS.

Regions and availability zones

We do know that AWS is spread out globally and has its presence across USA, Europe, Asia, Australia, and so on. Each of these areas is termed as a region. AWS currently has about 10 regions, each containing multiple data centers within themselves. So what's with all these regions and why do they matter? In simple terms, the resources that are geographically close to your organization are served much faster! For example, an organization running predominantly from USA can leverage the USA's regions to host their resources and gain access to them must faster.

For most of the AWS services that you use, you will be prompted to select a region in which you want to deploy the service. Each region is completely isolated from the other and runs independently as well.

Note

AWS does not replicate resources across regions automatically. It is up to the end user to set up the replication process.

A list of regions and their corresponding codes is provided here for your reference. The code is basically how AWS refers to its multiple regions:

Region

Name

Code

North America

US East (N. Virginia)

us-east-1

US West (N. California)

us-west-1

US West (Oregon)

us-west-2

South America

Sao Paulo

sa-east-1

Europe

EU (Frankfurt)

eu-central-1

EU (Ireland)

eu-west-1

Asia

Asia Pacific (Tokyo)

ap-northeast-1

Asia Pacific (Singapore)

ap-southeast-1

Asia Pacific (Sydney)

ap-southeast-2

Asia Pacific (Beijing)

cn-north-1

Each region is split up into one or more Availability Zones (AZs) and pronounced as A-Zees. An A Z is an isolated location inside a region. AZs within a particular region connect to other AZs via low-latency links. What do these AZs contain? Well, ideally they are made up of one or more physical data centers that host AWS services on them. Just as with regions, even AZs have corresponding codes to identify them, generally they are regional names followed by a numerical value. For example, if you select and use us-east-1, which is the North Virginia region, then it would have AZs listed as us-east-1b, us-east-1c, us-east-1d, and so on:

AZs are very important from a design and deployment point of view. Being data centers, they are more than capable of failure and downtime, so it is always good practice to distribute your resources across multiple AZs and design your applications such that they can remain available even if one AZ goes completely offline.

An important point to note here is that AWS will always provide the services and products to you as a customer; however, it is your duty to design and distribute your applications so that they do not suffer any potential outages or failures.

RULE OF THUMB: Design for failure and nothing will fail! This is what we will be sticking with for the remainder of this book as we go along the different AWS services and products; so keep this in mind, always!

Note

AWS provides a health dashboard of all its services running across each of the regions. You can view the current status and availability of each AWS service by visiting the following link: http://status.aws.amazon.com/.

AWS platform overview

The AWS platform consists of a variety of services that you can use either in isolation or in combination based on your organization's needs. This section will introduce you to some of the most commonly used services as well as some newly launched ones. To begin with, let's divide the services into three major classes:

Foundation services: This is generally the pillars on which the entire AWS infrastructure commonly runs on, including the compute, storage, network, and databases.Application services: This class of services is usually more specific and generally used in conjunction with the foundation services to add functionality to your applications. For example, services such as distributed computing, messaging and Media Transcoding, and other services fall under this class.Administration services: This class deals with all aspects of your AWS environment, primarily with identity and access management tools, monitoringyour AWS services and resources, application deployments, and automation.

Let's take a quick look at some of the key services provided by AWS. However, do note that this is not an exhaustive list:

We will discuss each of the foundation services.

Compute

This includes the following services:

Elastic Compute Cloud (EC2): When it comes to brute computation power and scalability, there must be very few cloud providers out there in the market that can match AWS's EC2 service. EC2 or Elastic Compute Cloud is a web service that provides flexible, resizable, and secure compute capacity on an on-demand basis. AWS started off with EC2 as one of its core services way back in 2006 and has not stopped bringing changes and expanding the platform ever since. The compute infrastructure runs on a virtualized platform that predominantly consists of the open sourced Xen virtualization engine. We will be exploring EC2 and its subsequent services in detail in the coming chapters.EC2 Container Service: A recently launched service, the EC2 Container Service, allows you to easily run and manage docker containers across a cluster of specially created EC2 instances.Amazon Virtual Private Cloud (VPC): VPC enables you to create secure, fully customizable, and isolated private clouds within AWS's premises. They provide additional security and control than your standard EC2 along with connectivity options to on premise data centers.

Storage

This includes the following services:

Simple Storage Service (S3): S3 is a highly reliable, fault tolerant, and fully redundant data storage infrastructure provided by AWS. It was one of the first services offered by AWS way back in 2006, and it has not stopped growing since. As of April 2013, an approximate 2 trillion objects have been uploaded to S3, and these numbers are growing exponentially each year.Elastic Block Storage (EBS): EBS is a raw block device that can be attached to your compute EC2 instances to provide them with persistent storage capabilities.Amazon Glacier: It is a similar service offering to S3. Amazon Glacier offers long-term data storage, archival, and backup services to its customers.Amazon Elastic File System: Yet another very recent service offering introduced by AWS, Elastic File System (EFS) provides scalable and high-performance storage to EC2 compute instances in the form of an NFS filesystem.

Databases

This includes the following services:

Amazon Relational Database Service (RDS): RDS provides a scalable, high-performance relational database system such as MySQL, SQL Server, PostgreSQL, and Oracle in the cloud. RDS is a completely managed solution provided by AWS where all the database heavy lifting work is taken care of by AWS.Amazon DynamoDB: DynamoDB is a highly scalable NoSQL database as a service offering provided by AWS.Amazon Redshift: Amazon Redshift is a data warehouse service that is designed to handle and scale to petabytes of data. It is primarily used by organizations to perform real-time analytics and data mining.

Networking

This includes the following services:

Elastic Load Balancer (ELB): ELB is a dynamic load balancing service provided by AWS used to distribute traffic among EC2 instances. You will be learning about ELB a bit more in detail in subsequent chapters.Amazon Route 53: Route 53 is a highly scalable and available DNS web service provided by AWS. Rather than configuring DNS names and settings for your domain provider, you can leverage Route 53 to do the heavy lifting work for you.

These are just few of the most commonly used AWS foundational services that we listed out here. There are a lot more services and products that you can leverage to add functionality or use to manage your applications. A few of these important services are briefly described in the next section.

Distributed computing and analytics

This includes the following services:

Amazon Elastic MapReduce (EMR): As the name suggests, this service provides users with a highly scalable and easy way to distribute and process large amounts of data using Apache's Hadoop. You can integrate the functionalities of EMR with Amazon S3 to store your large data or with Amazon DynamoDB as well.Amazon Redshift: This is a massive data warehouse that users can use to store, analyze, and query petabytes of data.

Content distribution and delivery

Amazon CloudFront is basically a content delivery web service that can be used to distribute various types of content, such as media, files, and so on, with high data transfer speeds to end users globally. You can use CloudFront in conjunction with other AWS services such as EC2 and ELB as well.

Workflow and messaging

This includes the following services:

Amazon Simple Notification Service (SNS): SNS is a simple, fully managed push messaging service provided by AWS. You can use it to push your messages to mobile devices (SMS service) and even to other AWS services as API calls to trigger or notify certain activities.Amazon Simple Email Service (SES): As the name suggests, SES is used to send bulk e-mails to various recipients. These e-mails can be anything, from simple notifications to transactions messages, and so on. Think of it as a really large mail server that can scale as per your requirements and is completely managed by AWS! Awesome, isn't it!

Monitoring

Amazon CloudWatch is a monitoring tool provided by AWS that you can use to monitor any and all aspects of your AWS environment, from EC2 instances to your RDS services to the load on your ELBs, and so on. You can even create your own metrics, set thresholds, create alarms, and a whole lot of other activities as well.

Identity and access management

AWS provides a rich set of tools and services to secure and control your infrastructure on the cloud. The most important and commonly used service for this is identity and access management (IAM). Using IAM, you can, as an organizational administrator, create and manage users, assign them specific roles and permissions, and manage active directory federations as well. We will be using a lot of IAM in the next chapter, which covers this topic in greater depth.

Getting started with AWS

So far, you have learned a lot about AWS, its architecture, and core components. Now, let's get started with the fun part—the signup process.

For all first time users, signing up for AWS is a very simple and straightforward process. We will go through this shortly, but first let's take a quick look at something called as a Free Tier! Yes, you heard it right… FREE!

So, AWS basically offers usage of certain of its products at no charge for a period of 12 months from the date of the actual signup. A brief list of a few products along with their description is listed here for your reference. Note that some of the description text may not make much sense now, but that's ok as this is just for your reference, and we will be bringing this up from time to time as we progress through the book.

AWS Product

What's free?

Amazon EC2

750 hours per month of Linux micro instance usage

750 hours per month of Windows micro instance usage

Amazon S3

5 GB of standard storage

20,000 get requests

2,000 put requests

Amazon RDS

750 Hours of Amazon RDS Single-AZ micro instance usage

20 GB of DB Storage: any combination of general purpose (SSD) or magnetic

20 GB for backups

10,000,000 I/Os

Amazon ELB

750 hours per month

15 GB of data processing

Note

For a complete insight into the free tier usage, check http://aws.amazon.com/free/.

Awesome! So when we have free stuff for us right from the word go, why wait? Let's sign up for AWS. To begin with, launch your favorite web browser and type in the following URL in the address bar: http://aws.amazon.com/.

You should see the AWS landing page similar to one shown here. Here, select either the Create an AWS Account option or the Create a Free Account option to get started:

The next screen will help you with the initial signup process. Provide a suitable e-mail address or your contact number in the E-mail or mobile number field. Select the I am a new user option and select the Sign in using our secure server button to proceed:

Note

You can alternatively sign in using your Amazon.com credentials as well; however, its best to use separate credentials for working with AWS.

The next couple of screens will be used to provide your basic details along with the billing information. In the Login Credentials page, enter your Name, your E-mail address along with a suitable Password. This password will be used by you to login to the AWS Management Console, so ideally provide a strong password here. Click on Create account when done.

The next screen is the Contact Information page. Provide your FullName, CompanyName, Country, Address, City, PostalCode, and PhoneNumber as requested. Check the Amazon Internet Service Pvt. Ltd. Customer Agreement checkbox and select the Create Account and continue options.

Enter a suitable Cardholder's Name and your Credit/Debit Card Number in the PaymentInformation page as shown:

The last part of the signup process is the IdentityVerification process where you will receive an automated call from AWS as a part of the verification process. You will have to enter the displayed four digit PINcode on your telephone's keypad during the call. Once the verification is completed, you can click on the Continue to select your Support Plan tab:

The final step in the signup process involves the selection of the Support Plan. AWS provides four support options to customers, each having their own SLAs and costs associated with it. Here is a quick look at the support plans provided by AWS:

Basic Support: As the name suggests, this is the most basic level of support provided by AWS. This support level provides you with access to the AWS community forums. You can additionally contact customer services for any queries related to your account and bill generation.

Note

The Basic Support plan is free of charge and all customers are entitled to it.

Developer Support: This is a paid support service ($49 per month). You can create and raise tickets for your support case, which is generally answered within 12 working hours.Business Support: This is a paid support service as well and is generally meant for enterprise-level customers running production workloads on AWS. The SLAs for this support are much higher as a case has to be answered within an hour from its creation. Additional support is provided 24/7, 365 days a year via phone and chat.Enterprise Support: A paid support service with the highest SLA available (15 minutes); these cases are generally handled by a separate team at AWS called the Technical Account Manager (TAM) who are subject matter experts in their own fields.

In our case, we opted to go with BasicSupport for the time being. You can change the support levels later on as well according to your needs. Click on Continue to complete the signup process. You should receive a couple of e-mails on your supplied e-mail address as well. These are introductory e-mails that will provide you with important links such as how to get started with AWS, billing page, account information, and so on.

With these steps completed, you are now ready to sign in to the AWS Management Console!

Introducing the AWS Management Console

So here we are, all ready to get started with the AWS Management Console! This is the most commonly used method to access, manage, and work with AWS services. We shall be looking more closely at the different AWS access mechanisms in the next chapter; however for now, let's quickly look at what the AWS Management Console is all about.

First off, sign in to the Management Console by launching your favorite browser and typing in http://aws.amazon.com. Click on the Sign in to the Console option and provide your EmailAddress and password as set during our signup process. Once you sign in, you will be welcomed to the AWS Management Console main landing page as shown here. Wow! That's a lot of products and services, right? The products are classified into their main classes such as compute, storage and content delivery, administration and security, and so on so forth. Take a moment and just browse through the dashboard. Get a good feel for it.

Navigating through the dashboard is also pretty straightforward. Let's look at the top navigation bar first. To the right-hand side you should be able to see three drop-down menus. The first should display your name as an end user. This option consists of three submenus that will help you with configuring your account details, security credentials, and billing management. The next tab lists the Region from where you will currently be operating. In our case, we have been placed in the US West (Oregon) region. Remember you can change these regions as and when you require, so feel free to change as per your current global presence:

Note

The US East (North Virginia) region is the cheapest region in AWS as it was one of the first regions to get set up and started.

The final tab in the list is the Support tab, and you can use it to login to the SupportCenter, AWSForums, and view the latest set of AWSDocumentation as well. Moving to the left-hand side of the tool bar, you will see four main icons listed there. Among these is a HomeScreen icon, which when clicked on will bring you back to the AWS dashboard screen irrespective of where you currently are.

The next drop-down option in the list is named as AWS, but what it really contains is called as ResourceGroups. These are a collection of AWS resources that can be organized and viewed as per your requirements. Think of these resource groups as a customized console where you as an end user can view all your required information about various AWS services in a single pane. How do resource groups work? Don't worry. We will be looking into this in more detail in the upcoming chapter.

Adjoining the Resource Groups is the Services tab, which lists the AWS services according to their class. It also has a history option that can be used to list and view your recently used AWS services.

The final tab is the Edit tab. This tab is used to customize your toolbar by filling it with those AWS services that you use frequently, kind of like a quick access bar. To add a particular AWS service to the toolbar, simply select the AWS service, drag and place it on the toolbar:

You can add multiple services as you see fit, and arrange them according to your needs as well. To save the changes to the toolbar, simply select the Edit option once again. You should see your AWS services listed out on the toolbar now. Feel free to dig around and check out the various options under each menu.

Getting started with AWS CLI

Now that you have a hang of the AWS Management Console, this would be a good time to take a quick look at the AWS CLI as well. Yes, you heard it right, apart from the standard web user interface, AWS provides a host of other mechanisms as well to help you gain access and use the various AWS resources. But why use a CLI in the first place? Isn't the AWS Management Console more than enough? Well, no. CLIs are more than just simple access and management tools. Using CLIs, you can automate the deployment and management of your AWS services using simple code and script, much like how you would use bash and shell scripting. This provides you with a lot of flexibility and customizability that a standard GUI simply won't provide!

The AWS CLI can be either installed on a Windows or a Linux machine. In case of Windows, AWS provides an easy-to-use installer, which can be downloaded directly from the AWS site. Once downloaded, all you need to do is run the installer, and voila, your Windows server should have the CLI installed and ready for use. But I'm not a Windows guy, so we will be walking you through the installation procedure on a standard Linux system.

Note

The 64-bit AWS CLI installer for Windows can be downloaded from https://s3.amazonaws.com/aws-cli/AWSCLI64.msi. The 32-bit installer can be downloaded from https://s3.amazonaws.com/aws-cli/AWSCLI32.msi.

In this case, we will be installing the AWS CLI on a CentOS 6.5 64-bit OS. The Linux distribution can be anything, from a Debian such as Ubuntu to a RedHat system; so long as it has Python installed and running off the latest version.

Note

Python versions supported are Python 2 version 2.6.5 and above or Python 3 version 3.3 and above.

You will also need sudo or root privileges to install and execute the commands, so make sure you have an appropriate user already created on your Linux system.

The installation of the CLI involves two major steps; the first involves the installation of Python setuptools, which is a prerequisite of installing Python's pip.

Run the following commands from your Linux terminal:

Download the setuptools tar file from the Python source repo:
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.tar.gz
Next, untar the setuptools installer using the tar command:
tar xvf setuptools-7.0.tar.gz
Once the contents of the tar file are extracted, change the directory to the setuptools directory:
cd setuptools-7.0
Finally, run the setup.py script to install the setuptools package:
python setup.py install

The following is the screenshot of preceding commands of the install process:

This completes the first part of the install process. The next process is very simple as well. We now install the Python pip package. Python pip is generally recommended when installing Python packages.

Run the following commands from your Linux terminal to install the Python pip package:

Download the Python pip installer script from Python's repo:
wget https://bootstrap.pypa.io/get-pip.py
Install the pip package:
python get-pip.py
Once pip is installed, you can now easily install the AWS CLI by executing the following command:
pip install awscli

Refer to the following screenshot showing the output of the installation process:

Simple, wasn't it! You can test your AWS CLI by executing few simple commands, for example, check the AWS CLI version using the following command:
aws –version

That's just for starters! There is a whole lot more that you can achieve with the AWS CLI, and we will make sure to utilize it in each of our chapters, just to get a good feel for it.