Sample
Sample
Web Services
(AWS)
Learning Amazon
Web Services
(AWS)
A Hands-On Guide to the
Fundamentals of AWS Cloud
Mark Wilkins
Learning Amazon Web Services (AWS) Acquisition Editor
Copyright © 2020 by Pearson Education, Inc. Paul Carlstroem
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, Managing Editor
or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, Sandra Schroeder
without written permission from the publisher. No patent liability is assumed with respect to Development Editor
the use of the information contained herein. Although every precaution has been taken in Kiran Panigrahi
the preparation of this book, the publisher and author assume no responsibility for errors
or omissions. Nor is any liability assumed for damages resulting from the use of the Project Editor
information contained herein. Lori Lyons
Production
Trademarks Manager
All terms mentioned in this book that are known to be trademarks or service marks have been Aswini Kumar
appropriately capitalized. Pearson cannot attest to the accuracy of this information. Use of a term
in this book should not be regarded as affecting the validity of any trademark or service mark. Copy Editor
Kitty Wilson
AWS screenshots © Amazon Web Services, Inc.
Indexer
Cover photo: Sdecoret/Shutterstock
Cheryl Lenser
Microsoft and/or its respective suppliers make no representations about the suitability of the
Proofreader
information contained in the documents and related graphics published as part of the services
Abigail Manheim
for any purpose. All such documents and related graphics are provided “as is” without warranty of
any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties and conditions Designer
with regard to this information, including all warranties and conditions of merchantability, whether Chuti Prasertsith
express, implied or statutory, fitness for a particular purpose, title and non-infringement. In no Compositor
event shall Microsoft and/or its respective suppliers be liable for any special, indirect or conse-
codeMantra
quential damages or any damages whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, arising out of or in connection with
the use or performance of information available from the services. The documents and related
graphics contained herein could include technical inaccuracies or typographical errors. Changes
are periodically added to the information herein. Microsoft and/or its respective suppliers may
make improvements and/or changes in the product(s) and/or the program(s) described herein at
any time. Partial screenshots may be viewed in full within the software version specified.
Microsoft® Windows®, Microsoft Office®, and Microsoft Azure® are registered trademarks of
the Microsoft Corporation in the U.S.A. and other countries. Screenshots reprinted with per-
mission from the Microsoft Corporation. This book is not sponsored or endorsed by or affili-
ated with the Microsoft Corporation.
For information regarding permissions, request forms and the appropriate contacts
within the Pearson Education Global Rights & Permissions Department, please visit
www.pearsoned.com/permissions/.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible,
but no warranty or fitness is implied. The information provided is on an “as is” basis. The
author and the publisher shall have neither liability nor responsibility to any person or entity
with respect to any loss or damages arising from the information contained in this book.
Special Sales
For information about buying this title in bulk quantities, or for special sales opportunities
(which may include electronic versions; custom cover designs; and content particular to
your business, training goals, marketing focus, or branding interests), please contact our
corporate sales department at [email protected] or (800) 382-3419.
For government sales inquiries, please contact [email protected].
For questions about sales outside the U.S., please contact [email protected].
Visit us on the Web: informit.com/aw
ISBN-13: 978-0-13-529834-3
ISBN-10: 0-13-529834-2
Library of Congress Control Number: 2019937606
ScoutAutomatedPrintCode
This page intentionally left blank
Contents at a Glance
Preface xix
1 Learning AWS 1
Index 409
Table of Contents
1 Learning AWS 1
About This Book 1
Trying to Define the Cloud 2
Moving to AWS 5
Infrastructure as a Service 6
Platform as a Service 8
Essential Characteristics of AWS Cloud Computing 10
Operational Benefits of AWS 14
Cloud Provider Limitations 15
Data Security at AWS 16
Network Security at AWS 18
Application Security at AWS 18
Compliance in the AWS Cloud 19
Playing in the AWS Sandbox 20
What’s the Problem That Needs to Be Solved? 21
Migrating Applications 23
The Well-Architected Framework 24
The Well-Architected Tool 25
In Conclusion 27
NIST 55
GovCloud 56
Latency Concerns 57
Services Offered at Each Region 58
Calculating Costs 59
Management Service Costs 60
Management Tools Pricing: AWS Config 61
AWS Compute Costs 62
Storage Costs 63
Data Transfer Costs 64
Understand Tiered Costs at AWS 66
Optimizing Costs at AWS 67
Optimizing Compute Costs 67
Tools for Analyzing Costs at AWS 69
Trusted Advisor 69
AWS Simple Monthly Calculator 73
Total Cost of Ownership (TCO) Calculator 75
In Conclusion 76
Top 10 Big-Picture Discussion Points: Compliance, Governance, Latency,
and Failover Considerations 76
S3 Storage 269
Buckets, Objects, and Keys 270
S3 Data Consistency 272
S3 Storage Classes 273
S3 Management 274
Versioning 277
S3 Bucket Security 278
Amazon S3 Glacier Archive Storage 280
S3 Glacier Vaults and Archives 281
Shared File Systems at AWS 281
Elastic File System (EFS) 282
EFS Performance Modes 283
EFS Throughput Modes 283
EFS Security 284
Storage Performance Compared 284
Amazon FSx for Windows File Server 286
Relational Database Service (RDS) 287
RDS Database Instances 288
High Availability for RDS 290
Big-Picture RDS Installation Steps 292
Monitoring Database Performance 293
Best Practices for RDS 293
Aurora 294
Aurora Storage 295
Communicating with Aurora 297
DynamoDB 298
Database Design 101 300
DynamoDB Tables 301
Provisioning Table Capacity 302
Adaptive Capacity 304
Data Consistency 305
ACID and DynamoDB 306
Global Tables 307
DynamoDB Accelerator (DAX) 308
Backup and Restore 308
ElastiCache 308
xiv Contents
Index 409
Companion Videos List
In addition to this book, several hours of companion online training videos are available.
Throughout the chapters, you’ll be invited to watch a video that relates to the topic being
covered in that section.
To access the videos, register this book at www.informit.com/register.
My opportunity to create this technical book for understanding AWS began in April 2018 after Mark
Taber, an acquisitions editor for Pearson Education, pinged me on LinkedIn. I had written technical
books before, and Mark asked if I was interested in writing one on the topic of Amazon Web
Services. I asked, “Do people actually buy paper books?” and he replied quickly, “They sure do.”
So, I thought about it and realized that most of the customers I had consulted with over the past
few years regarding the AWS cloud were smart technical people, but they had been thrown into
a bit of a panic because they had to get ready for moving to the cloud—specifically, the Amazon
cloud. And they were looking for a starting point to ramp up their technical cloud knowledge and
become technically proficient in what was happening in AWS cloud technologies.
I had spent a few years quite involved with AWS cloud services with various clients—including a
major Canadian bank, a major American bank, and several small-to-midsize companies working
in AWS—because their developers had developed applications they were using quite successfully.
The only problem was, they weren’t in the AWS cloud.
I thought about all my customers and realized that what was missing was a foundational book on
AWS that explained how the core AWS services of compute, storage, networking, scale, security,
and automation fit together. I decided to combine a book with a number of videos that would
walk through how to set up each service. This approach would allow my customers, and hopefully
many others, to visualize how AWS could work for their company or their project.
Writing a technical book is ultimately an abundance of research and rounds of testing, breaking,
and fixing until the project comes together. To create a detailed technical overview of Amazon
Web Services and how its cloud services fit together, I decided to review all the relevant AWS
documentation of the compute, storage, networking, and managed services by following the
pattern of reading and testing; then even more reading and testing. I then added some tips
and tricks, and finally summarized this last year’s work into the technical content found in the
chapters of this book. I learned a lot about AWS that I didn’t know—that’s the great thing about
researching and writing a book!
Throughout the chapters, you’ll be invited to watch the companion video that relates to the topic
that is being covered in a particular section.
xx Preface
Watching the videos will help you get in technical shape to start deploying your company’s
applications and resources at AWS. The videos take the place of page after page of step-by-step
instructions. This reason for no detailed steps is that in the AWS cloud, the steps to perform any
task are constantly changing, so up-to date videos as a means of teaching makes more sense.
Videos can also be updated easily as changes occur.
The videos can be accessed by registering your copy of this book at www.informit.com/register.
The videos can be watched on most any device as they are formatted in a standard MP4 video
format. And, don’t forget popcorn!
About the Author
Mark Wilkins is an Electronic Engineering Technologist with a wealth of experience in
designing, deploying, and supporting software and hardware technology in the corporate and
small business world. Since 2013, Mark has focused on supporting and designing cloud service
solutions with Amazon Web Services, Microsoft Azure, and the IBM Cloud. He is certified in
Amazon Web Services (Architecture and Sys-Ops). Mark is also a Microsoft Certified Trainer (MCT)
and holds certifications in MCTS, MCSA, Server Virtualization with Windows Server Hyper-V, and
Azure Cloud Services.
Mark worked as a technical evangelist for IBM SoftLayer from 2013 through 2016 and taught
both SoftLayer Fundamentals and SoftLayer Design classes to many Fortune 500 companies
in Canada, the United States, Europe, and Australia. As course director for Global Knowledge,
Mark developed and taught many technical seminars, including Configuring Active Directory
Services, Configuring Group Policy, and Cloud and Virtualization Essentials. Mark also developed
courseware for the Microsoft Official Curriculum 2008 stream, Managing and Maintaining
Windows Server 2008 Network Services, and Active Directory Services.
Mark’s published books include Windows 2003 Registry for Dummies, Administering SMS 3.0, and
Administering Active Directory.
Acknowledgments
A book is not written by a single person; many help along the way. I’d like to thank Ashley
Neace for giving me the opportunity to develop courseware for Global Knowledge way back in
2010 about the AWS cloud, and Rick Morrow, Mark Sluga, and Ryan Dymek for providing their
expertise and knowledge over the years working together at Global Knowledge and as valuable
technical resources. Thanks also to my editors Paul Carlstroem, Kiran Panigrahi, and Mark Taber
for providing support and guidance for this project.
1
Learning AWS
You may also want to get certified; however, this is not a book that is directly focused on AWS
certification. This book is instead focused on the so-called foundational services. All AWS certi-
fication tests are focused on problem-solving based on a particular scenario. Your job is to figure
out the best one or two answers; therefore, knowing the foundational services is key. If you want
to get certified on AWS cloud services, particularly on AWS architecture, you must know the
foundational AWS services inside and out. And you’ll have to spend a few hours doing hands-on
work with AWS services. If you want to develop applications that will be hosted at AWS, you will
need to know the foundational services in even more detail. And forget about learning everything
about AWS in a single book; it’s just not possible, and the reality is that AWS is constantly chang-
ing. That’s a notion you will learn to embrace.
Each chapter in this book attempts to deal with a specific concept or AWS service and provide a
strong detailed technical summary of the AWS service in question. However, there are not pages
and pages of step-by-step solutions because the steps change every couple of months. During the
writing of this book, AWS changed the design of its icons used in its technical documentation
2 Chapter 1 Learning AWS
three times. They also added 600 features and made numerous other changes, from cosmetic to
substantial.
To get around the issue of immediate obsolescence, there is a companion video library associated
with this book that shows you how to set up and install and configure many AWS cloud services.
You can access these videos by registering your book at informit.com/register.
Throughout the remainder of the chapters, you’ll be invited to watch the companion video that
relates to the topic that we are covering. The companion step-by-step videos can be changed and
updated or added to as AWS changes. The beauty of a video is that you can pause or rewind it
as you learn. Let’s begin the journey and see where we end up. This initial chapter includes the
following topics:
■ Defining the public cloud
■ Where AWS fits with IaaS and platform as a service (PaaS)
■ Characteristics of cloud computing according to NIST
■ Considerations for migrating applications to AWS
■ Operational benefits for operating in the cloud
■ The cloud service-level agreement (SLA)
■ Data, application, and network security at AWS
■ Compliance at AWS
■ AWS Well-Architected Framework
When I started my career as a computer technician back in the 90s, most corporations that I
supported used several computer-based services that were not located on premise. Accounting
services were accessed through a fast (at the time) 1200 baud modem that was connected using
one of those green-screened digital terminals. The serial cable threaded through the drop ceiling
to connect the terminal was strong enough to pull a car.
Trying to Define the Cloud 3
Challengers Leaders
Ability to Execute
Completeness of Vision
Figure 1-1 Top public cloud providers. Gartner, Magic Quadrant for Cloud Infrastructure as a
Service, Worldwide, Dennis Smith et al., 23 May 2018. (Gartner Methodologies, Magic Quadrant,
www.gartner.com/en/research/methodologies/magic-quadrants-research)1
A customer of mine at the time was utilizing a mainframe computer for accounting hosted locally
in town. However, he couldn’t access his accounting services any time he liked; he had his allot-
ted slice of processing time every Tuesday, and that was that. Payroll services were provided by
another remote service called Automatic Data Processing, or ADP for short. Both service compa-
nies and their services are still around today. IBM is continuing to release versions of its z series
mainframe, and ADP payroll services was one of the first software as a service (SaaS) companies
but remains popular today.
In 2015, IBM bought a cloud provider based in Texas called SoftLayer and merged it into its public
cloud offering, today called the IBM Cloud. The z mainframe has ended up being hosted in the
IBM cloud providing hosted mainframe services; in April 2018, IBM announced it was launching
what it called a “skinny mainframe” for cloud computing built around the IBM z 14 mainframe.
1
Gartner does not endorse any vendor, product or service depicted in its research publications, and does not
advise technology users to select only those vendors with the highest ratings or other designation. Gartner
research publications consist of the opinions of Gartner’s research organization and should not be construed as
statements of fact. Gartner disclaims all warranties, expressed or implied, with respect to this research, includ-
ing any warranties of merchantability or fitness for a particular purpose.
4 Chapter 1 Learning AWS
If you work for a bank or financial institution, IBM mainframes probably provide 50% of all your
computing services. This could be great news for companies that don’t want to have a local main-
frame environment to maintain.
Fifty years since the launch of the IBM mainframe, many companies’ mainframes are continuing
to be relevant and are now part of the public cloud landscape.
The reality is that more than 90 of the world’s largest 100 banks, the top 10 insurance companies,
a majority of the 25 largest retailers, and most of the world’s larger airlines still rely on mainframe
computers from IBM.
If you didn’t use mainframes, you probably lived through the deployment cycle of Novell
NetWare and Windows and Active Directory, and virtualization using VMware or Hyper-V. You
likely have a private cloud in your own data centers. You may be wondering why your company
is moving to the public cloud.
The reality these days is that it is expensive to build and maintain data centers. Certainly,
building a data center is going to cost millions or billions of dollars. Maintaining an existing
data center over the long term is expensive as well. Because of virtualization and the rise of
the Internet as a useful communication medium, cloud services have replaced many local data
centers and will continue to do so. Figuring out the capital costs of hosting your applications in
the public cloud instead of running them in your own data center is sometimes categorized as
renting instead of buying, as defined in Figure 1-2.
Operational expenses (OpEX) are all you pay for using cloud services. The capital expenditure
(CapEX) of building a data center does not have to be borne by a single business. Now let’s be
clear: operational expenses are still expensive. You might say to your boss, “I don’t need $800
million for data center construction, but I will need $2 million a year forever.”
CapEX = Buy
OpEX = Rent
The reality is that the cost of running and hosting your applications in the cloud is cheaper once
you add in every expense; however, operating in the cloud is only cheaper if your services being
hosted in the cloud are properly designed. Services and applications don’t run 24/7; they are
turned off or reduced in size when they’re not needed. A concept that you may not yet be familiar
with is automation. Public cloud providers use automated procedures to build, manage, monitor,
Moving to AWS 5
and scale every cloud service. By the end of this book, you will understand how automation is the
secret sauce for successful cloud deployments. Automated procedures will save you money and
allow you to sleep at night.
Let’s start by defining the public cloud. The cloud is just a collection of data centers. There is no
ownership from the customer’s point of view; the cloud provider owns the services, and you rent
each service as required. You may be thinking that the cloud is all virtual resources, yet the AWS
cloud can provide you bare-metal servers. If you want, Amazon will happily host your applica-
tions and databases on bare-metal servers hosted in its data centers. Of course, more commonly,
AWS will offer you many virtual servers in well over 150 different sizes and designs. Amazon is
also quite happy to allow you to continue to operate your on-premise data centers and coexist
with cloud resources and services operating at AWS. Microsoft Azure will offer to sell you a copy
of its complete Azure cloud operating system to install on your servers in your data centers. As
you can see, it’s hard to define the public cloud these days other than as a massive collection of
compute and storage resources hosted on a network stored in the collection of data centers acces-
sible across the Internet, or by using private connections.
Anything that you host in the public cloud is using compute and storage resources to execute
your software application. And anything that used to be a hardware device, such as a router,
switch, or storage array, can be replaced by a third-party software appliance or an AWS-managed
software service composed of virtual computers, storage, and networking components. This
doesn’t mean that many companies aren’t still using hardware devices. Hardware devices such
as routers and switches have incredible speed and can operate much faster in most cases than a
software router and switch. But what happens if you can run hundreds or thousands of virtual
machines in parallel performing the function of a hardware switch or hardware router device?
Perhaps we don’t need any hardware devices at all. Most of the AWS-managed cloud services are
hosted on virtual machines (defined as EC2 instances, or Elastic Cloud Compute instances), with
massive CPU and RAM resources running in massive server farms with custom-designed applica-
tions, providing the storage arrays, networking services, load-balancing, and auto-scaling services
that we depend on at AWS.
Moving to AWS
Once the decision has been made to move to the AWS cloud, countless moving parts begin to
churn. People need to be trained, infrastructure changes must take place, developers potentially
need to code in a different way, and IT professionals must get up to speed on the cloud provider
that has been chosen; there’s no time to waste. Larger companies will usually attempt to convey
the message of what moving to the cloud means for them. It’s quite common for executives
within the company to have strong opinions about what moving to the cloud will do. Sadly,
these opinions are not usually based on technical knowledge or real hands-on experience with
the cloud provider that has been chosen. Generally, companies utilizing cloud services fall into
several mind-sets:
■ The corporate mentality—You currently have data centers, infrastructure, and virtualized
applications. Ever-increasing infrastructure and maintenance costs are driving you to look
at what options are available in the public cloud.
6 Chapter 1 Learning AWS
■ Born-in-the-cloud mentality—You’re a developer with a great idea, but you don’t want to
maintain a local data center. In fact, you don’t have a local data center, and you want to get
going as soon as possible.
■ The startup mentality—You’ve just lost your job due to a merger or buyout and are
determined to strike out on your own. Your brand-new company has no data center but
plenty of ideas combined with a distinct lack of cash.
■ The government client—You’ve been told that, to save costs, your government department
is moving to the AWS cloud within a defined timeframe.
Each of these starting mind-sets will have differing points of view as to how it should start to
migrate or design its cloud infrastructure and hosted applications. Coming from a corporate
environment or government department, you will probably expect the cloud provider to have
a detailed service-level agreement (SLA) that you can change to match your needs. You will also
probably have expectations about how much detail you expect to be provided about the cloud
provider’s infrastructure and services. In short, you expect to be in control.
If you have started with a public cloud services provider as an individual developer, or you’re
working with a startup, you will probably have no comparison with current on-premise costs;
therefore, the overall costs that you pay for using a cloud provider will be accepted for the short
term but, over time, as your experience grows, your overall cloud costs will be analyzed and
managed to be as optimized and as cheap as possible.
Note
AWS has options for developers who want to craft and deploy applications hosted at AWS.
The site https://aws.amazon.com/startups/ is where you can get further information about
how you might be able to qualify for what is called AWS Promotional Credit. There’s a possibil-
ity of getting up to $15,000 in credits over 2 years, including AWS support and training.
The reality is that moving to the cloud means you will be giving up an element of control. After
all, it’s not your data center. At AWS, you’re not getting deeper into the infrastructure stack than
the subnets that host your applications. Remember, the cloud is a data center; it’s just not your
data center. Let’s start by looking at the available public cloud computing models of IaaS and PaaS
and where AWS fits within these definitions.
Infrastructure as a Service
Most of the services AWS offers fall into the infrastructure as a service (IaaS) definition, as shown
in Figure 1-3. This is certainly the most mature cloud model offering; virtualized servers and
virtualized storage arrays are hosted on a software defined network with each customer’s infra-
structure completely isolated as a private resource. Creating resources at AWS typically starts
with the creation of what is called a virtual private cloud (VPC). Virtual servers, virtual hard drive
volumes, and indeed complete managed services and products can be hosted on your isolated
private network. You have the flexibility to create whatever architectural stack you desire at AWS
using a vast number of services and utilities contained in the IaaS toolbox. Companies moving to
Moving to AWS 7
the AWS public cloud will typically first start with IaaS because the compute and storage services
closely mirror their current on-premise virtual environment.
Foundational
Services
IaaS cloud services at AWS are bundled with managed services. A managed service is built on
the trio of compute, storage, and networking services and customized software providing some-
thing you want Amazon to manage and maintain rather than your having to do all the work. For
example, AWS offers a managed service called relational database service (RDS). It will build, host,
maintain, back up, fail over, synchronize, and monitor a pair of master/standby database servers
for you, leaving you the single task of managing your data records. Many other managed services
are available at AWS; in fact, many managed services have no additional charges to begin using.
For example, an automation service called CloudFormation allows you to automate the procedure
of building infrastructure stacks complete with the required compute, storage, networks, and load
balancers required for your application stack. In fact, practically anything to do with building,
updating, or deleting your infrastructure stacks at AWS can be automated with CloudFormation.
Another handy service called CloudTrail is provided free of charge. It tracks and records all appli-
cation programming interface (API) calls that are carried out in each of your AWS accounts for
90 days. And yes, you can configure CloudTrail to store your API calls forever in S3 storage.
Your internal applications that are running in your on-premise data centers are probably a vast
soup of proprietary operating systems (HP, AIX, Linux) and of course Windows. Talk to most
departments in a small to midsize corporate environment, and the end users typically express
unhappiness with some of the current applications that they use daily. They have learned to live
with the ongoing issues of each application. Talk to the IT administrators and developers in the
corporate data centers; there very well could be a great deal of unhappiness with the inflexibility
of the existing infrastructure that they have to use and manage.
On top of these issues, perhaps each department has its own IT infrastructure. My company once
provided compute services for a midsized hospital with 25 separate networks. Typically, in a
8 Chapter 1 Learning AWS
larger corporation, compute services can be heavily siloed between departments, or each line of
business gets to make its own decisions.
Most companies with more than 100 employees have some semblance of virtual infrastructure
for their servers typically using VMware. Virtualization was supposed to be the answer to control-
ling a company’s infrastructure costs. However, the cost for virtualization services has become
extremely expensive to host, run, and maintain. Companies now know that capital and licensing
costs are some of the biggest expenses they incur when running an ever-expanding on-premise
private cloud. Replacing VMware with AWS-hosted virtualized servers and services removes a
company’s need for hypervisor administration expertise. And the landscape of applications used
by corporations is now widely available in the public cloud as hosted applications defined as soft-
ware as a service (SaaS) applications. As a result, there is ever-growing interest at the department
level or overall company level in using the public cloud to host applications. And the reality is,
you may not have a choice. If you’re a Microsoft shop, the odds are quite strong that some of your
everyday software applications such as Exchange and Microsoft Office are hosted by Microsoft
Azure and Office 365, allowing you to completely replace some of your in-house software deploy-
ments. For more details on the compute platform at AWS, check out Chapter 4, “Compute
Services: AWS EC2 Instances.”
If your company has no experience working with external cloud providers and you are a medium-
to large-sized corporation, it’s a certainty your company will fit the private cloud model. Most
of your company’s infrastructure will be hosted within several private data centers. For example,
your primary data center may be in Philadelphia, and your second data center could be in
Nashville. (If you’re a large enough company, your data centers may be spread across multiple
continents.) The applications used will number in the hundreds or thousands. You may be lucky
enough to have centralized IT standards, but these standards have become an issue due to the
applications that multiple departments have installed or created over the years. Maybe if you’re
unlucky, one of the central applications used by your company was developed by a summer
student and plunked into production without a second thought.
At AWS, infrastructure resources are spread across the world in 20 different regions. If you are in
a large population center, the odds are that Amazon is close by. If Amazon is not close by, you
still may be able to connect into it through one of the edge locations. More details on regions,
availability zones, and edge locations can be found in Chapter 2, “Designing with AWS Global
Services.”
Platform as a Service
Platform as a service (PaaS) cloud providers enable your developers to create custom appli-
cations on a variety of popular development platforms such as Java, PHP, and Python. The
developers don’t have to manually build the infrastructure components required for each
application per se; the required infrastructure resources are defined at the beginning of the
development cycle and are created and managed by the PaaS cloud provider. After applica-
tions have been developed and tested and are ready for prime time, the application is made
available to end users using public URLs. The PaaS cloud provider will host and scale the
hosted application based on demand. As more users use the application, the infrastruc-
ture resources will scale out or in as required. PaaS environments are installed on the IaaS
resources of the PaaS cloud provider, as shown in Figure 1-4. In fact, IaaS is always behind all
“as a service” monikers. Examples of PaaS providers include Cloud Foundry and Heroku.
Moving to AWS 9
Applications SaaS
Compute Storage
Networking
Resources Resources
IaaS
Hardware/Hypervisor
Expanding upon Cloud Foundry, this PaaS solution is the foundation of development at IBM
Cloud, where the underlying infrastructure is hosted on the IBM public cloud and running a
customized version of the Cloud Foundry platform components. Developers can sign up and
focus on writing applications. All requests will be handled by the PaaS layer interfacing with the
IaaS layer, where the compute, storage, load-balancing, and scaling services operate.
Another popular solution for developing applications in the cloud is Heroku, mentioned in passing
earlier. Heroku allows you to create and run hosted applications using a variety of development
platforms. Just like the IBM cloud, once the application has been written, Heroku hosts, balances,
and auto scales the application as required and sends you a bill for hosting at the end of the month.
If you’re dealing with a PaaS provider, remember that programming languages change from time
to time; therefore, APIs change as well, and usually without warning. If your developers don’t
keep up to date, there can be issues when using a PaaS cloud development platform.
Digging into the details on the Heroku website, under “Security,” the site states that, “Heroku’s
physical infrastructure is hosted and managed within Amazon’s secure data centers and utilize
the Amazon Web services technology.” Heroku is owned by another cloud heavyweight,
Salesforce. Salesforce indicated in 2018 that future expansion was going to be by utilizing
Amazon data center resources. Oh, what a tangled web we weave.
An additional reality is that one cloud provider’s PaaS system is not necessarily compatible with
another cloud provider’s service. Both AWS and Microsoft Azure offer similar cloud services, but
internally each cloud provider operates in a completely different fashion with a completely differ-
ent set of APIs. There is no single standard for defining just what PaaS must be. Compatibility
issues begin to reveal themselves at the lower levels of each vendor’s proposed solution. RESTful
interfaces, manifest file formats, framework configurations, external APIs, and component inte-
gration are not necessarily compatible across cloud vendors. AWS deals with platform services
using Lambda, the API Gateway, and several code deployment tools.
The applications that your company may have been developing and using internally will be
a variety of two- and three-tier architectures with many local dependencies such as network
10 Chapter 1 Learning AWS
storage, local storage, local users, and databases. The overall architecture design may have been
adequate at the beginning but now is straining to function due to the age of the hardware, the
sizing of the hardware, and the lack of any flexibility to change.
The distinct difference with on-premise design when compared to hosting applications at AWS is
that provisioning hardware and waiting for it to be set up and configured is a thing of the past. In
fact, there are many possibilities to consider when designing applications at AWS.
Your choice of language and development framework will determine the PaaS vendor you select.
Do you do a lot of development in Python? Are you a Java developer? Amazon has a PaaS solu-
tion called Elastic Beanstalk that automates the deployment of applications developed in Java,
Python, Ruby, and other development platforms on the required infrastructure components for
each application including E2 instances or Docker containers, with load-balancing, auto scaling,
and monitoring services.
Amazon has several development solutions, shown in Figure 1-5, including CodeBuild,
CodeCommit, Elastic Beanstalk, CodeDeploy. These can be key components in your applica-
tion deployment at AWS. Chapter 8, “Automating AWS Infrastructure,” covers these interesting
managed services and additional details on automating your infrastructure.
CodeBuild CodeCommit
On-demand self-service—We not only expect cloud service to be delivered quickly; we demand
it. All cloud providers offer a self-serve portal as AWS does, as shown in Figure 1-6. You request
a cloud service, and in seconds it’s available in your AWS account ready to configure. Gone are
the days of requesting a virtual server via email and waiting several days until it’s built. At AWS, a
virtual server can be started and operational in seconds. Procuring a software-defined network at
AWS (called a virtual private cloud) is available and operational in seconds. AWS has an expansive
Essential Characteristics of AWS Cloud Computing 11
self-serve management console that allows you to order and configure many cloud-hosted
services in seconds in any AWS region. Any cloud service that you order from AWS is automati-
cally delivered to you through heavily automated procedures. There are no public cloud providers
that survive without a self-service portal driven by heavy-duty automation in the background.
This NIST definition is now a standard.
Broad network access—Cloud services can be accessed from almost anywhere across the globe
using the Internet. If you host applications at AWS, perhaps they are public-facing SaaS apps.
AWS also provides HTTPS endpoints to access every cloud service hosted at AWS. However, you
may not want broad network access, which is defined as public network access to your cloud
services. In fact, many companies that are moving to the AWS cloud have no interest in a publicly
accessible software solution. They want their hosted cloud services to remain private, accessible
only by their employees using private connections. Each cloud customer ultimately defines the
real meaning of broad network access. At AWS, applications can be publicly available, or, you can
stay completely private. VPN connections from your place of work to AWS are commonplace;
in fact, you can order Direct Connect and establish a private fiber connection to AWS running
at speeds up to 10 Gbps. Depending on the type of applications you’re using in the cloud, high-
speed network access is essential. We can even use, access, and administer AWS service from our
phone using AWS apps. Certainly, accessing AWS from any device is possible. For more details on
networking, check out Chapter 3, “AWS Networking Services.”
Resource Pooling—Infrastructure resources for public cloud providers are pooled together in
many data centers across the different regions of the world and are dynamically assigned on
demand. A company running an on-premise private cloud would pool its virtual machines,
12 Chapter 1 Learning AWS
memory, processing, and networking capabilities into one or two data centers, and from its own
pool offer limited compute resources. All public cloud providers have a massive pool of resources
to serve our various needs. AWS has clusters of data centers (known as AZs or availability zones),
and each AZ could have over 80,000 bare-metal servers available and online allowing custom-
ers to host their application services with a high level of resiliency and failover. Having many
available online resources also enables AWS to keep the price down. Without a massive pool of
resources, AWS would not be able to offer its cloud services on demand that are able to scale up
and down based on customer demand. Having a massive resource pool is a necessary standard
for all public cloud providers; customers do not expect to run out of resources. Take, for example,
AWS S3 storage, which is unlimited with no defined maximum limit. For more details on regions
and AZs, check out Chapter 2.
Rapid Elasticity—Elasticity in the public cloud, or scaling, is the key feature required by all hosted
cloud applications. Elasticity at AWS is utilized for both compute and storage. Because most
services and applications are built on compute and storage, applications in the AWS cloud have
the capability to automatically scale, as shown in Figure 1-7. And elasticity, or scaling, is only
useful if it’s automated based on demand. Turning off a virtual server, adding RAM, and turning
it back on is not the elasticity that we are interested in; we want horizontal scale—that is, more
application servers—not just a bigger server. Real-time monitoring of a hosted cloud application
at AWS allows us to react almost instantaneously before the application’s performance is close to
degrading. With EC2 Auto Scaling in the background, additional computer resources are auto-
matically ordered and delivered to the application server’s cluster, maintaining the application’s
performance. Rapid elasticity based on demand is only possible with real-time monitoring driving
automated scale. This is why the public cloud is so popular; with a massive pool of available cloud
resources and the ability to automatically scale applications out and in based on demand, at AWS
anybody can easily scale application stacks up and down. For more details on deploying scale and
elasticity with EC2 Auto Scale, check out Chapter 5, “Planning for Scale and Resiliency.”
Application Capacity
User Demand
Resource
Time
Figure 1-7 Applications can scale based on demand in the public cloud
Measured Service—In the cloud, you are only billed for what you use; that’s defined as a
measured service. Cloud providers make their money by charging for everything that you use
Essential Characteristics of AWS Cloud Computing 13
in their data centers, including data transfer costs. Packet flow inbound to the public cloud is
usually free; outbound packet flow, or traffic between subnets hosted in different data centers, is
usually charged an outbound data transfer fee. Charges are per second, or per minute in the case
of computer services like AWS EC2 compute instances, or they are per gigabyte per month in the
case of storage services like S3 or virtual hard drives, which at AWS are called elastic block storage
(EBS). AWS charges can be broken down into compute, storage, and data transfer charges. If an
AWS service is on, the meter is running. Cost management is one of your most important jobs
when operating in the cloud. AWS has many useful tools to help you control your costs, includ-
ing the AWS Simple Pricing Calculator, AWS Budgets, and the Cost Explorer, as shown in Figure 1-8.
You can find details on these features in Chapter 2. Being billed for consuming cloud services is a
reality that we are all used to. What you also may have to get used to is exactly how you are being
billed. Again, you must understand and carefully monitor compute, storage, and data transfer
costs. For example, you can order a load balancer at AWS for $30 per month. However, there is
an additional charge to be aware of: all the data packets transferred through the load balancer are
charged, and that by itself can be a hefty price.
Figure 1-8 AWS Budgets and Cost Explorer track and alert when costs are over budget
14 Chapter 1 Learning AWS
Servers—Underutilized servers in your data center are expensive to run and maintain. Moving
applications to the public cloud will reduce the size of your on-premise data center. Because you
no longer host as many physical servers, your total hosting costs (heating, cooling, and so on)
will be lower as well. You also won’t have to pay for as many software licenses at the processer
level because you’re not responsible for running hypervisor services; that’s Amazon’s job. You
may think that moving to the AWS cloud means virtualized resources and only virtualization.
However, at AWS, you can get a variety of compute options with virtualization of any size and
scale, from a single-core CPU with 512MB of RAM to hundreds of CPU cores and terabytes of
RAM. You can also order a bare-metal server and do whatever you want with it. You can find
further details on compute options in Chapter 4.
Storage—Using cloud storage has huge benefits due to the unlimited amount of storage promised
by cloud providers. Amazon has many options for storage that are similar, but not exactly the
same as your on-premise solutions. For storage area network solutions, Amazon has shareable file
solutions: the elastic file system (EFS) for Linux workloads, and FSx, a shared file service specifi-
cally for Windows File Server workloads. Virtual hard disks are available using EBS. Unlimited
storage, and longer-term archive storage, is provided by S3 and S3 Glacier. Details on all the
storage options at AWS can be found in Chapter 6, “Cloud Storage.”
Managed services—AWS has a variety of managed services, as shown in Table 1-1, that may be
able to replace or complement your existing services and utilities currently used on-premise once
you move to the AWS cloud.
Regardless of the cloud model, the cloud provider is responsible for overall service operation and
deployment, service orchestration, the overall management of the cloud, the security of the cloud
components, and maintenance of customer privacy. The responsibility of how each customer, the
cloud consumer, is to carry out business with the cloud provider will also be described in some
detail in the SLA. Each cloud consumer must fully understand what each cloud service offered
provides; this is exactly what the cloud service will and will not do.
The reality is that every public cloud provider will not have an SLA that you will like, and the
stark reality is that their best effort is the best they can do. This might seem a little harsh, but it’s
reality; according to AWS, “everything fails all the time.” What happens when a key component
of your application hosted in the AWS cloud fails? Is it a disaster, or is it manageable? Is it accept-
able to expect AWS failures from time to time? It’s a reality; AWS is 100% right; everything fails.
Operating in the public cloud means that you must design your hosted application to be able to
continue operating even if compute and storage failures occur. That’s our responsibility.
All public cloud providers really have the same SLA; here it is, summarized in nine short words:
“we are sorry; we will give you a credit.” This SLA summary applies to every public cloud provider.
Here’s another reality check; if you’re down, you will have to prove that you were actually down
by providing network traces and appropriate documentation that leaves no doubt that you were
down because of an AWS cloud issue.
16 Chapter 1 Learning AWS
Oh, and here’s another small detail to be aware of: if you didn’t build redundancy into your appli-
cation design, don’t bother calling for a credit. Application designs that have a single instance
hosting the application with no failover or high-availability design parameters have no SLA. AWS
expects you to be serious about your application design; we need to understand and use the tools
in the AWS toolbox to ensure that your SLA for availability and performance is achieved.
Not every service at AWS even has a defined SLA; there are more than 100 services and only 8
defined SLAs. Remember: all managed services—in fact, all services—are built from the resources
found in Table 1-2.
Data security—The reality is that your data is more secure and durable stored in the public
cloud. At AWS, except for S3 Glacier archive storage, which is automatically encrypted, all other
storage mediums at AWS are unencrypted by default. However, EBS volumes—both boot and data
volumes—can be encrypted at rest and at transit using either customer master keys provided by
AWS or keys provided by the customer. Shared storage services such as EFS can also be encrypted
at rest, as can DynamoDB tables. S3 buckets can be encrypted with keys provided by AWS or
supplied by customers, as shown in Figure 1-9. Data durability provides security of a different
nature; all data stored in the cloud is stored in multiple locations; EBS volumes are replicated
Data Security at AWS 17
within the data center where they reside. S3 objects are replicated across three separate locations
within the selected AWS region, producing a high level of durability. Amazon’s level of S3 dura-
bility is humorously defined like this: for every 1,000 objects stored in an S3 bucket, you will lose
one of those objects every 10 million years. We cannot possibly duplicate this level of durability
and security on-premise.
Figure 1-9 S3 buckets can be encrypted using AES-256 or AWS-KMS managed keys
Data privacy—AWS does not have data storage isolated for individual customers; all storage
arrays at AWS are multitenant in design. This is pretty much the default for all public cloud
providers. Amazon’s job is to make sure your stored data records are isolated per AWS account.
Data control—Customers are in full control of storing and retrieving their data stored in AWS.
All data storage at AWS starts as private, and except for S3 buckets that are changed allowing
public access, storage remains private and is not directly accessible from the outside world.
Customers can choose to make S3 buckets public; it’s the customer’s responsibility to define the
security and accessibility of all data records stored in AWS.
Security controls—As previously mentioned, all data records can be encrypted at AWS. Resource
policies defining the precise level of security and access can be directly attached to resources such
as S3 buckets or EFS shared storage and can be defined by the identity and access management
(IAM) user and group security policy using the IAM service.
IAM identity and trust policies can be defined at a granular level controlling access by users and
roles to all resources at AWS, including any storage medium. Chapter 7, “Security Services,”
provides details on IAM.
It’s important to note that public and private connectivity choices are decisions that are always
carried out by each customer; not AWS.
■ Each subnet’s ingress and egress traffic can be controlled by a subnet firewall called
Network ACLs that define separate stateless rules for both inbound and outbound
packet flow.
■ Each EC2 instance hosted on a subnet is further protected by an additional firewall called a
security group, which defines what traffic is allowed into the instance and where outbound
traffic is directed.
VPC flow logs can be enabled to capture network traffic for the entire VPC, a single subnet, or a
network interface.
One load balancer type offered by AWS is the Application Load Balancer, which can perform
authentication and SSL offload services. The end-to-end traffic pattern for a three-tier Web appli-
cation can be designed using many encryption/decryption points, as shown in Figure 1-10 on its
path from source to destination:
■ Web application firewall—A custom traffic filter in front of the Application Load Balancer
protecting against malicious traffic.
■ Elastic Load Balancer (ELB)—Accepts only encrypted HTTPS traffic on port 443; provides
secure sockets layer/transport layer security (SSL/TLS) decryption and, optionally, user
authentication.
■ EC2 instance hosting Web application—EBS boot and data drives can be encrypted.
■ EC2 instance hosting application server—EBS boot and data drives can be encrypted.
■ Database server—EBS boot and data drives and data community can be encrypted, or
Dynamo DB tables can be encrypted.
Compliance in the AWS Cloud 19
AWS Cloud
Web
eb App
p
Filtering
rule
Database
Elastic Elastic
Load Load
Balancing Balancing
AWS WAF (ELB) (ELB)
Many countries in the world are enacting laws, regulations, and mandates in serious attempts
to protect the privacy of personal data and the security of corporate information and computer
systems. The new data protection laws place the burden of protection and security on the custodian
of that data; that is where the data is stored when the data is transferred from source to destination.
The cloud providers have contractual obligations to ensure that when organizations have data
records hosted in their cloud, they can adhere to the promises and commitments made in the
SLA. Some of the most common compliance regulations that AWS has been successfully audited
against include the compliance standards listed in Table 1-3.
Health Insurance Portability and Accountability Act—Secures the privacy of individual health
information records in the United States.
PCI DSS—Ensures the processing integrity of credit card data or authentication data.
GDPR—Protects privacy and personal data for all citizens of the EU. Amazon has a decent compli-
ance page at https://aws.amazon.com/compliance/, which has details about all the AWS certifica-
tions and attestations that it has achieved or supports. If you are bound by a specific compliance
standard, one of your first steps should be to review the AWS services that are available for each
compliance standard, as shown in Figure 1-11.
Figure 1-11 Check the AWS compliance page to see what services are supported
In addition, AWS has several free hands-on labs. You can sign up for QwikLabs at https://run.
qwiklabs.com/home?locale=en and carry out a variety of AWS tasks in the AWS cloud.
Figure 1-12 illustrates some of the learnig and labs that are available from QwikLabs.
QwikLabs Topics
Figure 1-12 QwikLabs has more than 20 completely free labs for AWS services
Running experiments, and performing labs raises additional questions that will help further your
AWS cloud knowledge and experience.
MAKE SURE TO WATCH THE COMPANION VIDEO “SIGNING UP FOR AWD FREE TIER.”
Start with low value/low risk—It’s quite popular to suggest a starting point of high value
and low risk when choosing your first application to move to the AWS cloud. Here’s a reality
check: it’s probably going to take you 6 months or longer to move your application to the cloud.
Choosing an application with low value provides a valuable timeline to do some additional plan-
ning and analysis before finalizing your application in its working form at AWS. I’ve seen many
companies make the pronouncement that applications will be moving to the cloud quickly. It
rarely happens successfully because there are so many things to learn and consider. Start with low
value. Take your time, and select a working application that has been running successfully for a
good time period. Then you can document your lessons learned and what to do differently the
next time. The second and third application moved to the cloud generally will be much faster
than the first application due to the lessons learned and experience gained.
22 Chapter 1 Learning AWS
Try to solve a single problem—Do you need additional storage? Perhaps that’s a great starting
point for your adventure in the cloud. Archiving files in S3 Glacier could be as simple as ordering
a Snowball device, connecting it up to your network, filling up with files you’d like to archive,
and shipping it back to AWS. This is an excellent first project to start working with AWS support,
archiving records, and saving your company money.
Define a value proposition—Ideally, the move to AWS is long term and successful. Thousands
of companies have been successful moving to AWS; you, too, can be successful. Start off with a
defined value proposition that can be validated quickly, in a matter of months rather than years.
For developing applications, you could sign up for AWS Cloud9, a cloud-hosted IDE that supports
more than 40 programming languages, as shown in Figure 1-13. Armed with a browser, you can
try your hand at developing applications at AWS.
Access to data records—The number-one problem with larger companies when starting to work
with cloud providers is working through the internal politics to allow access to data from the
Migrating Applications 23
cloud. Data record access, and the steps for successful access, should be considered before you
move to the cloud:
■ How can we access our on-premise data from the cloud?
■ What records have to stay on-premise?
■ Are we bound by any compliance rules and regulations?
■ Is our data in the right format for what we need?
Migrating Applications
For applications that have been chosen as starting candidates to move to the AWS cloud, several
decisions need to be made about the application’s journey, or path.
Can the application be moved to AWS and hosted on an EC2 instance with no changes?
Applications that fit into this category could be migrated to AWS as an EC2 instance image. Server
migration tools, and database migration tools discussed in Chapter 2, can carry out these migra-
tion paths quite effectively. However, applications that are lifted and shifted to the cloud will
have other dependencies and issues that will have to be considered:
■ The application stores its data in a database. Will the database remain on-premise or be
moved to the cloud?
■ If the database for the application remains on-premise, are there latency issues that need to
be considered when communicating with the database?
■ Will a high-speed connection need to be established between the AWS cloud and the
database remaining on-premise?
■ Are there compliance issues regarding the application data? Does the data have to be
encrypted at rest? Does communication with the database need to be encrypted?
■ Do users authenticate to the application across the corporate network? If so, are federation
services required to be deployed at AWS for single sign-on (SSO)?
■ Are local dependencies installed on the application server that will interfere with the
application server’s operation in the AWS cloud?
■ Are there licensing considerations for both the operating system and the application when
operating in the cloud?
Is there an existing SaaS application hosted by a public cloud provider that should replace
the application because it’s a better choice?
This can be a very political issue to resolve. With so many hosted cloud applications available in
the public cloud, the odds are close to 100% that there will be an existing application that could
replace the current on-premise application.
24 Chapter 1 Learning AWS
The documentation for the well-architected framework also has many key questions to ponder
that can be found in the well-architected framework blueprint. It is useful to discuss these ques-
tions out loud with other technical folks in your company; they will help you make key decisions
about your infrastructure and applications hosted at AWS. The framework documentation can
be found here: https://d1.awsstatic.com/whitepapers/architecture/AWS_Well-Architected_
Framework.pdf. Each application to be deployed at AWS needs to be viewed through the lens of
being well architected following these five principles:
Security—How to best design systems that will operate reliably and securely while protect-
ing customer information and data records. Key AWS services to utilize include IAM, AWS
Organizations, CloudWatch logs, CloudTrail events, S3 and S3 Glacier, and VPC flow logs.
Check out Chapters 3, 6, and 7. Security questions to consider include these:
■ How are security credentials and authentication managed at AWS?
■ How are automated procedures secured?
The Well-Architected Tool 25
Reliability—How can systems and applications hosted at AWS recover from disruption with
minimal downtime? How can applications meet your escalating demands? Key AWS services to
utilize include ELB, EC2 Auto Scaling, and CloudWatch alarms. Check out Chapter 5. Reliability
questions to consider include these:
■ How do you monitor resources hosted at AWS?
■ How do applications hosted at AWS adapt to changes in demand by end users?
Performance efficiency—How to use compute resources to meet and maintain your application
requirements on an ongoing basis. Should your compute solution change from EC2 instances to
containers or serviceless? Key services include EC2 Auto Scaling, EBS volumes, and RDS. Check
out Chapters 4 and 6. Performance efficiency questions to consider include these:
■ Why did you select your database?
■ Why did you select your current compute infrastructure?
Cost Optimization—How to design systems that meet your needs at the cheapest price point.
Key AWS services include Cost Explorer, Budgets, EC2 Auto Scaling, Trusted Advisor, and the
Simple Monthly Calculator. Check out Chapters 2, 5, and 7. Cost optimization questions to
consider are as follows:
■ How do you oversee usage and cost?
■ How do you meet cost targets?
■ Are you aware of current data transfer charges based on your AWS designs?
Before the review begins, you will select the AWS region where your application will be hosted.
The first step is to define the workload and choose the industry type and whether the application
is in a production or preproduction environment. During the review process, the well-architected
tool will identify potential areas of medium and high risk based on the answers to the questions
posed during the workload review. The five pillars of design success will also be included in the
plan that is presented showing the recommended improvements to your initial design decisions.
The plan as shown in Figure 1-15 will also define both high and medium risks, with recom-
mended improvements to consider implementing.
26 Chapter 1 Learning AWS
In Conclusion
In this initial chapter, we looked at just what the public cloud is these days and how AWS fits into
the public cloud arena in the areas of infrastructure and development, namely IaaS and PaaS. The
cloud is a data center; it’s just not yours.
The chapter looked at how NIST has defined the public cloud and how AWS fits into NIST’s
definition; in most cases the initial NIST definition has morphed into a standard, followed by
most corporations that have moved to the AWS cloud. We ended off with a bit of homework,
suggesting that you should sign up for an AWS account and look at ways to leverage the free
tier to further your learning, and you should review the AWS compliance page to see how your
compliance needs match with what AWS can offer. And, of course, you should carefully review
the well-architected framework documentation. It’s a pretty good guideline and online utility for
getting used to how Amazon operates and how you probably want to operate in the cloud. The
well-architected framework is also the baseline for the AWS Architecture Associate certification if
you’re moving toward getting certified in the future.
Don’t forget about the companion videos, which are going to be key to working at AWS. In the
companion videos, you’ll be introduced to Terra Firma, our use case for this book and the videos.
Each video will look at a problem or situation that Terra Firma is facing as a company and suggest
a solution. Each chapter also starts with several issues and concerns being faced by Terra Firma.
It’s my hope that you can relate to the company’s concerns and the presented solutions. Each
chapter ends with some relevant discussion points for consideration.
MAKE SURE TO WATCH THE COMPANION VIDEO ON OUR USE CASE FOR THIS BOOK: “Terra Firma.”
Let’s start learning about the big picture: regions, availability zones, and edge locations in
Chapter 2.
This page intentionally left blank
Index
Symbols
12-factor app rules, 386–393
administrative processes, 393
backing services, 389
codebase, 386–388
concurrency, 392
configuration storage, 388–389
dependencies, 388
development/production parity, 393
disposability, 392–393
isolate/build/run stages, 389–390
log streams, 393
port binding, 392
stateless processes, 390–391
A
accelerated computing instances, 160–161
acceptor VPCs, 123
Access Advisor, 360–361
access control lists (ACLs), 348
access keys for IAM users, 329–331
rotating, 335–337
access logs, 244
access management. See IAM (identity and
access management)
ACID, DynamoDB and, 306–307
ACLs (access control lists), 348
actions (CloudWatch), additional settings,
226
actions (IAM), 324–325, 344–345
adaptive capacity in DynamoDB, 304–305
administrative access (security groups), 115
410 administrative processes in 12-factor app rules
CodeDeploy and, 399–400 EFS (Elastic File System). See Amazon EFS
cost of, 177–187 (Elastic File System)
reserved instances (RI), 178–182 egress-only Internet gateway (EOIG),
spot instances, 182–187 132–133
creating with CloudFormation, 381–382 EIP (elastic IP addresses), 104–106
health checks, 230–231 EKS (AWS ECS for Kubernetes), 205–206
history of virtualization, 148–152 Elastic Beanstalk, 389–390, 394–397
launch templates, 176 elastic block storage (EBS). See EBS (elastic
monitoring, 226 block storage)
naming conventions, 153 Elastic Compute Cloud. See EC2 instances
network performance, 163–164 Elastic Container Service (Amazon ECS),
ordering, 190–196 204–205
configuration options, 192 elastic EBS volumes, 264
storage options, 193 Elastic File System (EFS). See Amazon EFS
rebooting/recovering, 226–227 (Elastic File System)
resource isolation, 153–154 elastic IP addresses (EIP), 104–106
storage, 187–189 elastic load balancing (ELB). See ELB
tagging, 175 (elastic load balancing)
types of, 155–163 ElastiCache, 308–309
accelerated computing, 160–161 elasticity, 12, 209–211
bare-metal, 161–162 in 12-factor app rules, 392
burst, 157–158 AWS Auto Scaling, 251–252
changing, 176–177 defined, 12
compute optimized, 159 EC2 auto scaling, 245–251
dedicated hosts, 162 ASGs (auto scaling groups), 248–251
dedicated instances, 162–163 benefits of, 245–246
general-purpose, 156–157 launch configurations, 246
M1, 156 launch templates, 247
memory-optimized, 159–160 NIST definition, 209–210
micro, 156 ELB (elastic load balancing), 227–233
for paravirtualization, 156 additional features, 231–233
storage-optimized, 161 designed redundancy, 229–230
vCPUs, 154–155 EC2 health checks, 230–231
EC2-Classic, 80 feature comparison, 229
EC2-VPC. See VPCs (virtual private clouds) monitoring, 243–244
edge location services, 44 security groups, 116–117
AWS Shield, 46 encryption
AWS Shield Advanced, 46 AEAD, 123
CloudFront, 47–48 EBS volumes, 265–266
Lambda@Edge, 48–49 endpoints
list of, 44–45 in Aurora, 298
Route 53, 45–46 gateway endpoints, 125–128
WAF (Web Application Firewall), 47 interface endpoints, 128–131
IaaS (infrastructure as a service) 417
IAM (identity and access management), ICMP access (security groups), 115
317–365 identities (IAM), 319
access requests, 322–323 tagging, 350–351
account details, 332–333 identity federation, 357–358
account summary, 333–334 identity management. See IAM (identity and
actions, 324–325 access management)
authentication, 320–322 identity-based policies (IAM), 337–339
authorization, 323–324 inbound port numbers, 121–122
AWS services available, 15 inbound rules (NACLs), 118–120
best practices, 358–360 infrastructure as a service (IaaS), 6–8
features, 318 infrastructure as code. See automation
groups, 332
in-line policies (IAM), 340–341
identity federation, 357–358
installing
MFA (multifactor authentication), 337
Amazon RDS (Relational Database
password policies, 334–335 Service), 292–293
policies, 337–350 CloudWatch agent, 216–217
ACLs (access control lists), 348 instance storage. See EBS (elastic block
actions, 344–345 storage)
conditional elements, 350 instance store-backed AMIs
creating, 341–342 creating, 169–170
elements of, 342–343 EBS-backed AMIs versus, 170–171
identity-based, 337–339 instances (EC2). See EC2 instances
in-line, 340–341 Intelligent-Tiering class (S3), 273–274
permission boundaries, 346–347 interface VPC endpoints, 128–131
resource-based, 340
Internet gateways, 131–133
SCPs (service control policies), 347
inventory processing (S3), 277
session policies, 348
io1 (provisioned IOPS), 262–263
summary tables, 348–349
IP addressing
syntax, 343–344
BYOIP, 107–109
versioning, 349
cost of, 106–107
roles, 351–355
elastic addresses, 104–106
cross-account access, 354–355
IPv6 addresses, 110
when to use, 352–353
load balancer support, 232
signing in, 332
primary CIDR block, 91–93
STS (security token service), 355–356
private IPv4 addresses, 102–103
tagging identities, 350–351
public IPv4 addresses, 103–104
terminology, 319–320
secondary CIDR blocks, 93
tools for, 360–365
IPv4 addressing
users, 325–334
elastic addresses, 104–106
access keys, 329–331
private addresses, 102–103
creating, 328–329
public addresses, 103–104
identifying, 328
IPv6 addressing, 110
root user, 326–328
isolation of regions, 34
rotating access keys, 335–337
monitoring 419
J M
job function policies (IAM), 339 M1 instances, 156
M4 instances, 157
L M5 instances, 156, 157
magnetic drives
Lambda, 206–208, 400–401
EBS (elastic block storage), 263
Lambda@Edge, 48–49
local instance storage, 187–189
latency, designing AWS, 57–58
managed policies (IAM), 338
latency-based routing (LBR), 142
managed services
launch configurations, 246
cost of, 60–62
launch templates, 176, 247
defined, 7
Launch VPC Wizard, 88–89
operational benefits, 14–15
LBR (latency-based routing), 142
mapping service, 85–86
LCUs (load capacity units), 228
measured services, 12–13
lifecycle hooks, 251
memory caches, 308–309
LightSail, 206
memory-optimized instances,
Linux AMIs, 166–167 159–160
listeners, choosing, 236 MFA (multifactor authentication), 337
load balancers, 18–19, 227–244 micro instances, 156
ALB (Application Load Balancer), migrating applications to AWS, 196–202
233–243
AWS Migration Hub, 199–200
creating, 234–237
AWS SMS (Server Migration Services),
health check configuration, 242–243 200–201
HTTPS listener security settings, choosing applications, 21–23
239–240
questions to ask, 23–24
rules, 237–239
steps in, 197–198
sticky session support, 242
tools for, 196–197
target groups, 233–234, 240–241
VM Import/Export service, 202
user session maintenance, 241
Well-Architected Framework, 24–26
cost of, 228
mobile application authentication, 353
ELB (elastic load balancing), 227–233
monitoring, 211–227
additional features, 231–233
AWS services available, 14
designed redundancy, 229–230
CloudWatch
EC2 health checks, 230–231
agent installation, 216–217
feature comparison, 229
alarm creation, 224–225
monitoring, 243–244
alarm/action settings, 225–226
NLB (Network Load Balancer), 244
dashboard, 224
security groups, 116–117
metrics in, 213–215
load capacity units (LCUs), 228
rebooting/recovering EC2 instances,
local instance storage, 187–189 226–227
location, choosing, 30–32 service integration, 219–220, 223
log streams in 12-factor app rules, 393 terminology, 220–223
logging data, 215–216 EC2 instances, 226
420 monitoring
NIST (National Institute of Standards and EC2 instances and networking, 163–164
Technology) storage comparison, 284–286
AWS compliance, 55–56 permission boundaries (IAM policies),
public cloud definitions, 10–13 346–347
scaling/elasticity definition, 209–210 PING access (security groups), 115
Nitro hypervisor, 150–151 planning for monitoring, 217–219
NLB (Network Load Balancer), 244 platform as a service (PaaS), 8–10
features, 229 policies (IAM), 337–350
ACLs (access control lists), 348
O actions, 344–345
conditional elements, 350
object lock (S3), 275–276
creating, 341–342
object storage. See Amazon S3
elements of, 342–343
object tags (S3), 277
identity-based, 337–339
on-demand scaling, 250–251
in-line, 340–341
on-demand self-service, 10–11
permission boundaries, 346–347
One Zone-1A class (S3), 274
resource-based, 340
OpsWorks, 376 SCPs (service control policies), 347
optimizing costs, 67 session policies, 348
compute costs, 67–68 summary tables, 348–349
reserved pricing, 69 syntax, 343–344
ordering EC2 instances, 190–196 terminology, 319–320
configuration options, 192 versioning, 349
storage options, 193 policy objects (IAM), 320
OUs (organizational units), 366 Policy Simulator, 361–362
outbound rules (NACLs), 118–120 port binding in 12-factor app rules, 392
pricing. See cost
P primary CIDR block, planning, 91–93
P states, 160 principals (IAM), 320
PaaS (platform as a service), 8–10 privacy, 17, 41
packet flow, 83–85 private cloud services, 8
paravirtualization, 148, 152, 156 private DNS zones, 143
parity in 12-factor app rules, 393 private IPv4 addresses, 102–103
password policies (IAM), 334–335 private subnets, 18
path-based routing, 238–239 PrivateLink, 128–131
PCI (Payment Card Industry) compliance provisioned IOPS (io1), 262–263
checklist, 51–52 provisioning capacity in DynamoDB, 302–303
PCI DSS, 20 public cloud services
peering VPCs, 123–125 application security, 18–19
performance compliance standards, 19–20
Amazon EFS (Elastic File System), 283 cost of, 4–5
Amazon RDS (Relational Database data security, 16–17
Service), 293 defined, 5
EBS (elastic block storage), 263 history of, 2–4
422 public cloud services
VPCs (virtual private clouds). See also app server inbound ports, 114
networking custom, 113–114
availability zones (AZ), 95 database server inbound ports,
AWS networking internals, 81–83 114–115
CIDR block creation, 91 default, 112–113
primary CIDR block, 91–93 ELB traffic flow, 116–117
secondary CIDR blocks, 93 PING access, 115
console, 78–79 subnets
creating, 86–90 creating, 95–97
default VPC, 93–95 NAT gateway services, 97–98
defined, 6–7 route tables, 98–102
Direct Connect, 138–139 VPN connections, 133–138
endpoints CloudHub, 137
gateway endpoints, 125–128 customer gateway, 135–136
interface endpoints, 128–131 route propagation, 137–138
flow logs, 122–123 VPG (virtual private gateway),
hosting versus associating services, 81 134–135
Internet gateways, 131–133 VPG (virtual private gateway), 134–135
IP addressing VPN connections, 133–138
BYOIP, 107–109 CloudHub, 137
cost of, 106–107 customer gateway, 135–136
elastic addresses, 104–106 route propagation, 137–138
IPv6 addresses, 110 VPG (virtual private gateway), 134–135
private IPv4 addresses, 102–103
public IPv4 addresses, 103–104 W
number of, 90–91
WAF (Web Application Firewall), 47
packet flow, 83–85
Well-Architected Framework, 24–26
peering connections, 123–125
Windows AMIs, 167
Route 53, 139–144
WRR (weighted round robin), 141
Alias records versus CNAME records,
140–141
DNS hostnames, 143–144 X
health checks, 142–143 X1 instances, 150, 159, 160
private DNS zones, 143 Xen hypervisor, 148–150
routing protocols, 141–142
security, 79–80
Z
security groups, 110–113
administrative access, 115 Z1d instances, 160