Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

Practical Machine Learning with AWS: Process, Build, Deploy, and Productionize Your Models Using AWS
Practical Machine Learning with AWS: Process, Build, Deploy, and Productionize Your Models Using AWS
Practical Machine Learning with AWS: Process, Build, Deploy, and Productionize Your Models Using AWS
Ebook333 pages2 hours

Practical Machine Learning with AWS: Process, Build, Deploy, and Productionize Your Models Using AWS

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Successfully build, tune, deploy, and productionize any machine learning model, and know how to automate the process from data processing to deployment. 
This book is divided into three parts. Part I introduces basic cloud concepts and terminologies related to AWS services such as S3, EC2, Identity Access Management, Roles, Load Balancer, and Cloud Formation. It also covers cloud security topics such as AWS Compliance and artifacts, and the AWS Shield and CloudWatch monitoring service built for developers and DevOps engineers. Part II covers machine learning in AWS using SageMaker, which gives developers and data scientists the ability to build, train, and deploy machine learning models. Part III explores other AWS services such as Amazon Comprehend (a natural language processing service that uses machine learning to find insights and relationships in text), Amazon Forecast (helps you deliver accurate forecasts), and Amazon Textract.
By the end of the book, you will understand the machine learning pipeline and how to execute any machine learning model using AWS. The book will also help you prepare for the AWS Certified Machine Learning—Specialty certification exam.

What You Will Learn
  • Be familiar with the different machine learning services offered by AWS 
  • Understand S3, EC2, Identity Access Management, and Cloud Formation
  • Understand SageMaker, Amazon Comprehend, and Amazon Forecast
  • Execute live projects: from the pre-processing phase to deployment on AWS

Who This Book Is For

Machine learning engineers who want to learn AWS machine learning services, and acquire an AWS machine learning specialty certification

LanguageEnglish
PublisherApress
Release dateNov 24, 2020
ISBN9781484262221
Practical Machine Learning with AWS: Process, Build, Deploy, and Productionize Your Models Using AWS

Read more from Himanshu Singh

Related to Practical Machine Learning with AWS

Related ebooks

Intelligence (AI) & Semantics For You

View More

Related articles

Reviews for Practical Machine Learning with AWS

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Practical Machine Learning with AWS - Himanshu Singh

    Part IIntroduction to Amazon Web Services

    © Himanshu Singh 2021

    H. SinghPractical Machine Learning with AWS https://doi.org/10.1007/978-1-4842-6222-1_1

    1. Cloud Computing and AWS

    Himanshu Singh¹  

    (1)

    ALLAHABAD, Uttar Pradesh, India

    This chapter covers the different components of cloud computing and of Amazon Web Services (AWS). After reading the chapter, you’ll understand the different important components of AWS, which will make it easier to understand the machine learning components of AWS.

    What Is the Cloud?

    So, what is the cloud? If you look at memes shared across the internet, you might think the cloud is nothing but someone else’s computer that you can use from your own computing device, for your own personal use. Then the question arises, why do we need the other computer when we have our own? It’s because our computer may not have things that the other system has. Maybe your budget when buying a system was less than the other person’s, and he therefore has more computational power to use. So, instead of buying a new system with more computational power, you can just access the other system for some amount of time and then return to your own system. This is the benefit that the cloud provides. And, by the way, we all know the other system is not just any normal system. Cloud systems are provided by big companies such as Amazon and Google. So even if you are trying to buy a new system with as much computational power as cloud systems, you will not be able to afford it.

    Formally speaking, the cloud is a particular computing service that is present at a different remote location that we can access using networking or the internet. Cloud services may include storage services, infrastructure services, software services, or any other specific services that you need. Figure 1-1 shows how different devices are connected to cloud systems at a remote location.

    ../images/495447_1_En_1_Chapter/495447_1_En_1_Fig1_HTML.jpg

    Figure 1-1

    How different devices are connected to cloud systems at a remote location

    If we are able to access any of the services present at the remote location using the internet or networking, then we call this cloud computing.

    Control of Cloud Systems

    Obviously, if someone is allowing access to use their personal system over the internet, then they may want to restrict access in some ways. Or, they may want one group of people to have full access, but another group to have limited access. This is done to avoid security issues and not expose the vulnerabilities present in the system. To solve this problem, cloud computing comes in four types.

    Public cloud

    Private cloud

    Hybrid cloud

    Community cloud

    Public Cloud

    When the entire cloud infrastructure is open for public consumption, then it is called a public cloud. Examples are the email services provided by Google or Yahoo.

    Private Cloud

    When only a specific group of people can access the services provided by a cloud, then it is called a private cloud. An example is when people in an organization can access the resources present in the organization’s cloud, but no one from outside the organization can access the same resources.

    Community Cloud

    When a cloud service is accessible to a group of organizations, then it is called a community cloud. For example, different organizations can access the services of AWS or the Google Cloud Platform by registering. So, the same services are available to all the organizations that have paid for it, but not to anyone else.

    Hybrid Cloud

    When a cloud service provides both options (i.e., services of a public and private cloud), then it is termed a hybrid cloud. An example is using two services of AWS. When we train a model using SageMaker training, it is a private task for specific organizations because it contains sensitive data and other things, but when we train a model and then share the endpoint publicly, it is a public cloud because whoever has the link can access that endpoint. (You’ll learn more about SageMaker in later chapters.)

    Cloud Services

    Now that you have learned about the different ways of accessing a cloud, let’s dive deeper and look at the services that a cloud platform may provide. We can group these services into four domains.

    Infrastructure as a service (IaaS)

    Platform as a service (PaaS)

    Software as a service (SaaS)

    Anything as a service (XaaS)

    Infrastructure as a Service

    As the name suggests, when a cloud service provider gives access to users to the infrastructure that it has built, it is considered an IaaS. For example, a cloud provider may give access to virtual machines, physical machines, storage devices, etc. For example, we can use Google Drive to store information on the cloud, since Google is providing its hard drives as a service. AWS also provides machines called EC2 instances that individuals can use to do operations that require higher computational power.

    Platform as a Service

    Sometimes, instead of requiring an entire infrastructure, we want only a specific development runtime where we can write our code or make games or websites. This way the cost of building an entire infrastructure can be reduced. This type of service is a PaaS. For example, we can use Google Colaboratory for writing Python or R code. In addition, we can use AWS SageMaker to train and put a machine learning model into production. There are other service providers as well such as Microsoft Azure, Google Cloud Platform, IBM Cloud, etc.

    Software as a Service

    When we don’t want the runtime, but we want to use a specific software application with its built-in runtime, we don’t need a PaaS, which would give us the runtime as well as dependencies and software we’d need to install. Hence, there are cloud services that provide specific software for specific uses, called SaaS. Examples of SaaS are Amazon Ground Truth, which is used for data management, and Office 365 by Microsoft.

    Anything as a Service

    The first three types of services have been on the market for quite some time, but now, because of the advancement in technology, cloud service providers are providing almost anything as a cloud service. For example, we can now draw sketches of web pages and give them to Azure, which converts them into HTML pages. In addition, you can play online songs by just talking to Alexa, which is connected to AWS. All this comes under the umbrella of XaaS.

    Let’s now dive deeper into a specific cloud service provider, called Amazon Web Services (AWS).

    Introduction to Amazon Web Services

    AWS provides global cloud computing services across many countries and is currently responsible for handling the infrastructure of many companies, including small and large enterprises. According to the AWS documentation, currently AWS caters to hundreds of thousands of businesses in 190 countries.

    AWS provides more than 150 services that can be used on demand and can be paid for based on the time used. Currently, AWS has data servers in a lot of regions, and you can choose to use only one region’s server that is closest to your users. The following is the list of data servers across the globe:

    North America

    Ohio (US East)

    Oregon (US West)

    Northern California (US West)

    Northern Virginia (US West)

    Gov Cloud (US East and US West)

    Canada (Central)

    South America

    Sao Paulo

    Europe/Middle East/Africa

    London (Europe)

    Stockholm (Europe)

    Frankfurt (Europe)

    Paris (Europe)

    Bahrain (Middle East)

    Ireland (Europe)

    Asia Pacific

    Singapore (Asia Pacific)

    Beijing (Mainland China)

    Sydney (Asia Pacific)

    Tokyo (Asia Pacific)

    Seoul (Asia Pacific)

    Ningxia (Mainland China)

    Osaka (Asia Pacific)

    Mumbai (Asia Pacific)

    Hong Kong (Asia Pacific)

    As I mentioned, AWS has more than 150 services. The question is, how do you access them? Is there a single centralized place from where they can be accessed? Well, yes! This place is called the AWS Management Console. Let’s look at some of the features of this console and how it is really helpful to users.

    AWS Management Console

    With the AWS Management Console (AMC), not only can you access the services, but it provides some other cool features as well. Some of them are as follows:

    Once you have created an account on AWS and logged in to AMS, then your session remains active only for 12 hours. After that, you need to log in again. Obviously, this time limit is customizable. This feature is provided for security reasons.

    Not only can you access AMS from the Web, but you can use the mobile app as well. The AMS app is present both on IOS and on Android devices.

    AMS provides access to different learning resources, articles, documentation, videos, etc., which help us in understanding the different services of AWS.

    You can even customize and personalize AMS based on your usage and needs.

    After logging in to AWS, you will see the following features:

    Search button to find specific services

    Recently visited services by a user

    List of all the services

    Links to automated workflows

    Link to learning resources

    Figures 1-2, 1-3, 1-4, and 1-5 show the different screens of AMS.

    ../images/495447_1_En_1_Chapter/495447_1_En_1_Fig2_HTML.jpg

    Figure 1-2

    Find Services feature and recently visited services on AMS

    ../images/495447_1_En_1_Chapter/495447_1_En_1_Fig3_HTML.jpg

    Figure 1-3

    Learning resources on AMS

    ../images/495447_1_En_1_Chapter/495447_1_En_1_Fig4_HTML.jpg

    Figure 1-4

    Automation on AMS

    ../images/495447_1_En_1_Chapter/495447_1_En_1_Fig5_HTML.jpg

    Figure 1-5

    List of all services on AMS

    We will look at how to log in to AWS and visit AMS in detail in the next section about machine learning. Now, let’s move to the next feature of AWS called the AWS Command-Line Interface (AWS CLI).

    AWS Command-Line Interface

    If AMC gives you a visual interface to access the AWS services, the CLI gives you some advanced power to access the same services through the console. It is used by advanced developers who have spent some time with AWS. You just need to download a single tool, and then you can use it to control different services, write scripts, and have control over the automation of services.

    AWS provides a lot of resources such as reference documents, GitHub repositories, forums, etc., for understanding AWS CLI. Though one can use AWS CLI from the default console such as the command prompt of Windows or terminals of Linux and Mac, there is a dedicated AWS shell that provides some advanced functionalities. Some of them are as follows:

    Autocompletion support

    Inline documentation of commands

    OS shell commands, which can also be executed from the same shell

    We will be using the CLI a lot when we will cover machine learning in detail. Therefore, we will look at its practical aspects directly in that section.

    Because AWS provides so many services, covering all of them is not possible in one book. Moreover, this book is about machine learning, so it doesn’t make any sense to cover every service here. But, we will discuss three services that I think are really important and commonly used. The following are the services that we are going to discuss here:

    AWS Storage Services

    AWS Compute Services

    AWS Networking and Content Delivery Services

    Let’s start the discussion with the first one, Storage Services.

    AWS Storage Services

    When we work on a cloud platform and use its services, obviously we’ll have a lot of data depending on the requirements. For example, if we are building a website, then we will have images, videos, and lots of other things to store. If we have a machine learning model, then we will have terabytes of data to handle. This data can be both structured and unstructured. Similarly, for business purposes, we can have multiple Excel sheets or presentations. All these data types must be stored somewhere in the cloud, and the cloud platform should provide this facility.

    AWS provides a lot of options for data storage, and we’ll discuss three of them in this section.

    Amazon S3

    Amazon Elastic File System (EFS)

    AWS Storage Gateway

    Amazon S3

    One of the most used services of AWS is Amazon Simple Storage System (S3). It provides you with an interface where you can store your data in a similar way to how you store it in your local file system. You can create folders and multiple subdirectories to organize your data. The following are some of the basic features Amazon S3 provides:

    It provides scalability, which is currently leading in the industry.

    It provides real-time data availability.

    It provides security and optimized performance.

    It has a durability of 99.9999999… percent (11 nines).

    S3 is really simple to use. First let’s understand some of the naming conventions used by Amazon S3.

    Buckets

    A bucket is just like a folder in your local file system. It is a container used for storing your files.

    Objects

    The files that you store in S3 are termed objects. All the objects are stored inside the buckets.

    Keys

    Every object that you store will be given a unique identifier called a key. Also, not only objects but buckets are provided with unique keys.

    Does S3 only provide simple storage, as its name suggests? I will say yes and no. Yes, because its main use is storage only, and it is really simple. No, because it has lots of other features revolving around the storage feature that make it a go-to service for every customer. Let’s see what those features are that make S3 so powerful.

    Based on how frequently data

    Enjoying the preview?
    Page 1 of 1