Chapter 6
Introduction to Amazon Web Services

WHAT'S IN THIS CHAPTER

  • Introduction to the basics of cloud computing
  • Introduction to the AWS ecosystem and key services used to build machine learning solutions
  • Signing up for an account under the AWS free tier

In this chapter, you learn about what cloud computing is, read about common models of abstraction used when discussing cloud-based services, and discover a high-level overview of Amazon's offerings in the cloud-computing space, with emphasis on services that help build machine learning solutions. The chapter wraps up by walking you through signing up for an AWS account.

What Is Cloud Computing?

Cloud computing is defined by the U.S. National Institute of Standards and Technology (NIST) as “a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (such as networks, servers, storage, applications and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.”1

NIST defines five essential characteristics in this model. Each of these is briefly examined next:

  • Broad network access: A consumer should be able to access services from anywhere.
  • Resource pooling: A provider's computing resources are pooled to support multiple customers.
  • On-demand self-service: A consumer should be able to provision computing resources (such as virtual servers) as needed, with minimal human interaction.
  • Measured service: A consumer should be able to use computing resources on a pay-as-you-use basis.
  • Elasticity: A consumer should be able to provision additional resources automatically and on demand. To ensure this, the provider pools computing resources to provide horizontal scalability to the consumer.

Cloud-computing solutions provide two major advantages to businesses:

  • Costs: The cloud-computing paradigm is based on sharing and optimal utilization of hardware resources. A business need only pay for the time during which it utilizes a resource. When a resource is not needed, the business can relinquish it and make it available for someone else to use. This reduces both the upfront hardware investment cost for a business as well as ongoing maintenance costs. The cloud service provider, not the consumer, handles the maintenance of the underlying hardware.
  • Availability: The time to provision a ready-to-use resource in the cloud is significantly lower than having to set up a similar resource in-house. For instance, a business could provision a virtual server with a cloud provider within seconds, whereas the actual process of procuring new server hardware and software usually takes a few months in most medium to large organizations.

Cloud Service Models

Cloud computing is built on virtualization technology. Fundamentally, there are two types of virtualization:

  • Application virtualization: A single machine hosts one or more applications that are delivered to one or more users over the Internet.
  • Hardware virtualization: Also known as server virtualization, in this model a single physical machine hosts multiple virtual machines. Each virtual machine can have its own operating system (different from the operating system of the underlying physical machine) and its own unique set of applications.

As an end user, you expect to consume one or more services from your cloud-computing provider over the Internet. These services can range from bare-bones virtual machines with a basic operating system to entire suites of applications. Five common models for cloud services are shown in Figure 6.1. These can be conceptualized using a layered model, with higher layers building upon the services offered by lower layers.

Chart depicts common cloud service models.

FIGURE 6.1 Common cloud service models

  • Infrastructure as a service (IaaS): You specify the low-level details of the virtual server you require, including the number of CPUs, RAM, hard disk space, networking capabilities, and operating system. The cloud provider offers a virtual machine to match these requirements. In addition to virtual servers, the definition of IaaS includes networking peripherals such as firewalls, load balancers, and storage. Therefore provisioning multiple load-balanced Java application servers on the cloud as well as storing your files on a cloud-based disk would both come under the IaaS model.
  • Platform as a service (PaaS): You choose between combinations of infrastructure and preconfigured software that best suits your needs. The cloud provider offers a virtual machine with preconfigured internal applications to match your requirements. The PaaS model is generally easier to use as you do not have to set up the underlying hardware and software; however, this can also be restrictive as your level of control on the underlying systems is significantly reduced compared to the IaaS model. The choice of infrastructure and pre-installed software differs between cloud providers, and if a cloud vendor does not provide something off the shelf that meets your needs, you are out of luck.
  • Software as a service (SaaS): You specify the kind of software application you want to use, such as a word processor. The cloud provider provisions the required infrastructure, operating system, and applications to match your requirement. Most SaaS cloud providers include a limited choice of the hardware characteristics that run the application and as a user you usually have no direct access to the underlying hardware that runs your application. You are also tied to the limitations of the hardware and software chosen by your cloud provider. If, for instance, a cinema chain is using a SaaS cloud-based booking system to manage ticket sales and the system is unavailable due to an internal error with the hardware used by the cloud provider, there is little the cinema chain can do but wait until the cloud provider has fixed the issue.
  • Business process as a service (BPaaS): You specify a business process that you want to outsource to a cloud provider. The cloud service provider provisions the hardware, operating system, support software, and web applications to provide the required service. A good example of BPaaS would be a cloud-based service to compute quarterly value-added tax (VAT) returns and submit these returns to the relevant tax authority on your behalf. Such a service could present you with a browser-based front end in which you upload your invoices and business bank statements. The service could then extract relevant information from the uploaded documents (using OCR, perhaps), fill out the relevant tax authority's forms, ask you to review the results, and submit the return on your behalf once you are happy with the numbers.
  • Machine learning as a service (MLaaS): The cloud provider provides a number of services to assist with data modeling, machine learning model building, data transformation, data visualization, natural language processing, facial recognition, prediction, and deep learning. The services themselves may be classed as either software/application-level or platform-level services. The classification depends on how much control and flexibility is provided to the end user. The cloud provider automatically provisions the underlying infrastructure with sufficient capacity to scale up with demand.

Cloud Deployment Models

A deployment model answers the following questions:

  • Who can access a computing resource?
  • How can a user access a computing resource?
  • Where is the physical hardware?

Cloud-computing solutions have four distinct deployment models:

  • Public cloud: A public cloud provides services over the Internet to a consumer located anywhere in the world. The physical resources utilized by the provider to supply these services can also be anywhere in the world. This type of service could represent potential challenges to organizations such as banks that are prevented by regulatory requirements from storing confidential data on external systems. The cloud provider is generally responsible for procurement, setup, physical security, and maintenance of the physical infrastructure. To an extent the cloud provider is also responsible for the security of the application and data; this would depend on the service model (IaaS/PaaS/SaaS).
  • Private cloud: A private cloud offers services to a single organization. Services are provided over a secure internal network and are not accessible to the general public over the Internet. The organization owns the physical hardware that supplies underlying services and is responsible for setup, maintenance, and security of both the infrastructure and all the software that runs on the infrastructure. Because of the large infrastructure costs associated with this model, only very large corporations can afford to have their own private clouds. A private cloud is commonly referred to as an on-premises cloud, and can offer any combination of IaaS/SaaS/PaaS to the organization.
  • Community cloud: A community cloud provides services to a small group of entities (individuals, universities, or corporations) over a secure network. The underlying resources used to supply the services are owned by the entities that the community cloud serves. In essence, this type of cloud service can be thought of as something between a public cloud and a private cloud. The service is not accessible to members of the general public and does not put a significant drain on any one entity's finances. The entities involved usually share a common goal or provide services in a common industry sector.
  • Hybrid cloud: A hybrid cloud is essentially a cloud service that is composed of other types of cloud services. For example, a hybrid cloud could consist of both public and private clouds. The public subcloud could provide services that are intended for consumption by any user over the Internet. A private cloud could offer services that are sensitive to the business. Most large organizations use a hybrid cloud model. It lets them provision public cloud resources when needed for a specific business case, while continuing to enjoy the security and control that a private cloud allows for all their existing processes.

The AWS Ecosystem

Amazon Web Services is the most rapidly evolving cloud-computing service in the market. The current AWS offering consists of over a hundred services offered in locations around the world, with new services being added every year.

New additions to AWS are announced at AWS re:Invent, which is the official annual AWS conference. You can find more information on AWS re:Invent at https://reinvent.awsevents.com.

Figure 6.2 describes a brief timeline of AWS. AWS was born in a paper presented by Chris Pinkham and Benjamin Black to Jeff Bezos in 2003.

Chart depicts brief timeline of Amazon Web Services.

FIGURE 6.2 Brief timeline of Amazon Web Services

This paper suggested selling Amazon's internal infrastructure as a service to the world. In 2006 AWS was officially launched as a platform with a few key services, including EC2 and S3.

In November 2010, Amazon announced that all of Amazon.com had migrated to AWS. The first AWS re:Invent conference took place from November 27 to November 29, 2012, at the Venetian Hotel in Las Vegas. In 2015, Amazon launched its own machine learning platform called Amazon Machine Learning, and in 2016 announced three new API-based services specifically geared toward machine learning applications: Amazon Rekognition, Amazon Polly, and Amazon Lex.

At the time this book was written, AWS offered 130 services, each of which resided in one of 20 different service categories. The service categories are as follows:

  • Compute
  • Storage
  • Database
  • Migration
  • Networking & Content Delivery
  • Developer Tools
  • Management Tools
  • Media Services
  • Machine Learning
  • Analytics
  • Security, Identity & Compliance
  • Mobile Services
  • AR & VR
  • Application Integration
  • AWS Cost Management
  • Customer Engagement
  • Business Productivity
  • Desktop & App Streaming
  • Internet of Things
  • Game Development

You can find details on all AWS services within these categories at https://aws.amazon.com/products/.

Amazon's offerings in the machine learning space are grouped into two categories: application services and platform services.

Machine Learning Application Services

These services are designed to solve specific machine learning problems out of the box and can be integrated into your own applications via APIs. Some of the services in this category are listed here:

  • Amazon Comprehend: This is a service that allows you to build applications that need to understand the structure and content of text. Amazon Comprehend uses Natural Language Processing (NLP) to extract insights into the content of documents. The insights can be entities (people, places), key phrases, sentiment (positive, neutral, mixed, or negative), and syntax. Amazon Comprehend is applicable across a variety of use cases; for example, an application that can examine the contents of forums to understand topics that your customers are interested in. Amazon Comprehend is covered in Chapter 13.
  • Amazon Lex: This is a service that allows you to build conversational interfaces (chatbots) that support both text and voice. Amazon Lex uses deep learning to implement Natural Language Understanding (NLU) and Automatic Speech Recognition (ASR) and is the same engine that is used in Amazon Alexa. Amazon Lex is covered in Chapter 14.
  • Amazon Polly: This is a text-to-speech service that you can use in your application. It supports multiple languages and a selection of voices. Amazon Polly can be used in several real-world applications, including newsreaders, games, and eLearning platforms. Amazon Polly is not covered in this book. You can learn more about Amazon Polly at https://aws.amazon.com/polly.
  • Amazon Rekognition: This is a service that provides APIs for deep learning–based object detection and recognition in images and videos. Amazon Rekognition can be used in a variety of real-world applications, including content-based search in images and videos, facial biometric verification, and inappropriate-content detection. Amazon Rekognition is covered in Chapter 18.
  • Amazon Translate: This is a document-translation service that can be used to translate text between a variety of languages. You can use it to translate unstructured text or build applications that support multiple languages. Amazon Translate is not covered in this book. You can find more information on Amazon Translate at https://aws.amazon.com/translate/.
  • Amazon Transcribe: This is a speech-to-text service that can transcribe speech in audio files into text. It can be used for a variety of applications, including generating closed-caption text for a video. Amazon Transcribe is not covered in this book. You can find more information on Amazon Transcribe at https://aws.amazon.com/transcribe/.

Machine Learning Platform Services

These services provide you with tools to build, train, and evaluate machine learning models. Platform services do not address any specific machine learning problem out of the box; instead, you need to use them to build a machine learning solution from scratch to address the problem you are working on. Some of the services in this category are listed here:

  • Amazon Machine Learning: This is a cloud-based service that lets you quickly build machine learning models using a wizard-based interface. Amazon Machine Learning is intended for simpler applications that can be solved using linear and logarithmic regression models and does not require the user to write any code. You can set up APIs to expose your Amazon Machine Learning models with minimal effort. Amazon Machine Learning is covered in Chapter 15.
  • Amazon SageMaker: This is a fully managed service that lets you build, train, and deploy your own machine learning models using a variety of algorithms and frameworks on dedicated machine learning–optimized compute infrastructure. Amazon SageMaker also allows you to create notebook instances that can be used for data visualization, exploration, and analysis. These notebook instances come pre-installed with a Jupyter Notebook server, a number of popular Python machine learning libraries, and a number of conda kernels. Amazon SageMaker is covered in Chapters 16 and 17.
  • AWS DeepLens: This is a wireless video camera and an integrated cloud-based development platform. You can train Convolutional Neural Networks (CNNs) on the development platform and deploy the models to the wireless video cameras. AWS DeepLens is not covered in this book. You can get more information on AWS DeepLens at https://aws.amazon.com/deeplens/.

Support Services

In the previous sections you learned about Amazon's machine learning application and platform services. These services do not operate in isolation—often you will find yourself using a number of other AWS services during the build and deployment phases of your machine learning application. In this section you will look at a few AWS services that you are likely to encounter while building and deploying machine learning solutions:

  • AWS IAM: Amazon Identity and Access Management (IAM) lets you securely control who can access your AWS resources, what resources they can access, and what they can do with these resources. IAM is covered in Chapter 8.
  • AWS Lambda: AWS Lambda lets users run snippets of code without provisioning an infrastructure. This service is billed on a pay-as-you-go model, with users only paying for the execution time of their lambda code. There is no charge when code is not running. Lambda code can be set up to automatically trigger from other AWS services or called directly from any web or mobile app. AWS Lambda is covered in Chapter 12.
  • Amazon S3: Amazon Simple Storage Service (S3) is a secure, durable, and scalable cloud-based object store. Using this service, you can store your files in the cloud. Amazon S3 is covered in Chapter 9.
  • Amazon DynamoDB: Amazon DynamoDB is a high-performance, scalable cloud-based NoSQL database service. Amazon DynamoDB is covered in Chapter 11.
  • Amazon Cognito: Amazon Cognito allows you to create identity profiles for your app's users and allow them to sign in to the app with their Amazon, Facebook, Twitter, or Google accounts. Once users have authenticated from the app, the app is given a token that can be used to access AWS cloud resources securely. Amazon Cognito also offers a service that allows authenticated users to sync their app data on different devices. Amazon Cognito is covered in Chapter 10.

Sign Up for an AWS Free-Tier Account

To use AWS, you need to sign up for an AWS account. If you do not already have one, you can sign up for an account under the AWS free tier. An AWS account under the free tier is designed to enable you to try some of the AWS offerings free for 12 months, subject to certain usage limits. Go to https://aws.amazon.com/free/ to obtain information on what is included in an AWS free-tier account. Amazon Machine Learning is not available under an AWS free-tier account.

To create an AWS account under the free tier, you need to go through a five-step process. Some of the steps have multiple substeps:

  1. Contact Information
  2. Payment Information
  3. Identity Verification
  4. Support Plan Selection
  5. Confirmation

Step 1: Contact Information

To start the sign-up process for an AWS account under the free tier, visit aws.amazon.com and click the Create an AWS Account link on the top-right corner of the page (see Figure 6.3).

Screenshot of Amazon Web Services home page.

FIGURE 6.3 Amazon Web Services home page

Amazon frequently tries out new user experiences with its customers, so this page may look different from the screenshot. However, you should still be able to find the relevant option to create an AWS account on the page.

Type in a valid email address, password, and account name on the Create an AWS Account screen (see Figure 6.4) and click the Continue button. The account name is a personal identifier you can use for this account.

Screenshot of AWS sign-in screen.

FIGURE 6.4 AWS sign-in screen

You will be asked to indicate if the account is for an individual or a company (Figure 6.5). Select the option appropriate to your situation. This chapter assumes you have opted to create a Personal (individual) account.

Screenshot of contact Information screen.

FIGURE 6.5 Contact Information screen

You will be asked to provide contact information (including a phone number) on the Contact Information screen. You must provide a phone number that you have immediate access to and can receive a call on. Scroll down to the bottom of the page if necessary, read and accept the terms and conditions of the AWS customer agreement, and click Create Account and Continue to move to the next step.

Step 2: Payment Information

You need to provide credit/debit card details (see Figure 6.6). Although an account under the free tier provides access to some AWS services for free, not all services are included in the free tier. If you use services not included under the free-tier account or exceed the usage limits of services under the free tier, the card you provide is charged.

Screenshot of payment Information screen.

FIGURE 6.6 Payment Information screen

The precise services and options that are available under the free tier can change from time to time. Every effort will be made in this book to inform you whether an example utilizes AWS features outside those available in the free tier. To get up-to-date information on what is included in the free tier, visit https://aws.amazon.com/free/.

Type your credit/debit card details and click the Secure Submit button to move on to the identity verification step.

Step 3: Identity Verification

The identity verification process involves receiving a call from an automated system on a number you provide and entering a four-digit PIN into your phone when prompted. Type a telephone number and click Call Me Now (see Figure 6.7).

Screenshot of phone verification screen.

FIGURE 6.7 Phone Verification screen

A four-digit PIN then appears on the web page (see Figure 6.8). You receive a call on the telephone number you have provided and are asked to enter the four-digit PIN you see on the web page.

Screenshot of phone verification PIN.

FIGURE 6.8 Phone verification PIN

The identity verification process completes once you key in the four-digit PIN over the phone. The web page refreshes to reflect this (see Figure 6.9).

Screenshot of completing the identity verification process.

FIGURE 6.9 Completing the identity verification process

Click Continue to move on to the next step of the account creation process.

Step 4: Support Plan Selection

Select a support plan from the list of options available (see Figure 6.10). The options are:

Screenshot of support plan selection.

FIGURE 6.10 Support plan selection

  • Basic
  • Developer
  • Business
  • Enterprise

The support plans are cumulative and differ in the level of support that you receive, with the more expensive options giving you access to an Amazon employee to answer your questions. The default, selected option is Basic, and it is free. For the purposes of this book, the Basic support plan suffices. Select the default Basic support plan and click Continue.

Step 5: Confirmation

You receive confirmation that your AWS free-tier account is now set up (see Figure 6.11).

Screenshot of completing the signup process.

FIGURE 6.11 Completing the sign-up process

You also receive a confirmation message by email to the address you used during the sign-up process. In the next chapter you learn different ways you can access AWS and how to secure the account you have just created.

Summary

  • Cloud computing is defined by the U.S. National Institute of Standards and Technology (NIST) as “a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.”
  • Cloud computing provides both cost and availability benefits to businesses.
  • Common cloud-computing service models include infrastructure as a service (IaaS), platform as a service (PaaS), software as a service (SaaS), business process as a service (BPaaS), and machine learning as a service (MLaaS).
  • Cloud solutions are deployed using standard deployment models. A deployment model defines how a computing resource can be accessed, who can access the resource, and where the physical hardware is located.
  • There are four distinct deployment models that are commonly used for cloud solutions: private cloud, public cloud, community cloud, and hybrid cloud.
  • AWS offers over 100 different cloud services, grouped into 20 different service categories. Amazon is continuously adding to the services that are available.
  • An AWS account under the free tier is designed to enable you to try some of the AWS offerings free for 12 months, subject to certain usage limits.
  • Amazon's cloud-based machine learning services can be classified into two categories: application services and platform services.

Note

  1. 1   Peter Mell and Timothy Grance, “The NIST Definition of Cloud Computing,” NIST Special Publication 800-145. September 2011. (http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-145.pdf)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.201.32