# SageMaker Service Description
In the following, the AWS service “SageMaker” is presented. In addition to its functionality and purpose, the main advantages and limitations of its use as well as the price model are addressed. Information used is obtained from related AWS glossaries and documentations.
## Definition and Purpose
Amazon SageMaker is a fully managed machine learning (ML) service for developers and data scientists. The service, equipped with a wide range of web-based tools accessible through a single, visual user interface (SageMaker Studio), facilitates several ML process phases. This ranges from data exploration and preparation through the building, training, and tuning to the deployment and live operation of a trained model.
Different functional levels of machine learning are supported. At the top level, SageMaker provides pre-trained machine learning models that can be used directly for own applications. As a further functional level, Sage Maker contains various machine learning algorithms that can be used to train own models. To create own algorithms, SageMaker integrates and supports the concept of Jupyter notebooks. Jupyter notebooks are open source web applications and contain the necessary libraries, drivers, and packages for respective deep learning frameworks such as TensorFlow, PyTorch, or Apache MXNet. Underlying computing resources are fully elastic, and notebooks can be easily shared with others, enabling seamless collaboration. Nevertheless, with native support for bring-your-own-algorithms and frameworks, SageMaker also offers flexible distributed training options that adjust to specific workflows.
The service is fully integrated with Amazon Web Services and allows the connection and usage of other AWS services such as databases, batch processing, or Amazon Kinesis. Trained models can be deployed secure and scalable into various Amazon Availability Zones for live operation with little effort and a few clicks. Applications can be connected to the machine learning instances via API calls.
The graphic below shows all components and tools currently integrated into SageMaker, assigned to the ML process phase to which they are applied.
**Corresponding Services of AWS SageMaker:**

*Source: AWS*
In the context of this case study, functions of the following tools, including SageMaker Studio, Studio Notebooks, and JumpStart, are applied and are therefore introduced in more detail below.
As mentioned above, Amazon SageMaker Studio provides a web-based user interface in which the individual phases of machine learning are executed. It provides control, governance, and insight into the processes of creating, training, and deploying the models. For example, it can be used to create notebooks, optimize models, or debug machine learning processes.
SageMaker Studio Notebooks integrates and supports the concept of Jupyter notebooks explained previously. The notebooks run with an assigned instance type, which can be chosen out of all available EC2 instances. Thereby, SageMaker already contains many predefined notebooks for different use cases.
SageMaker JumpStart provides pre-built ML solutions for common use cases with just one click. Included are:
* 15+ end-to-end solutions for common ML use cases such as fraud detection or predictive maintenance.
* 150+ models from the TensorFlow Hub and the PyTorch Hub for computer vision and natural language processing.
* Sample notebooks for the built-in algorithms available in Amazon SageMaker.
## Benefits and Limitations of Usage
All previous AWS services with a similar purpose to SageMaker, such as “Amazon ML,” have been integrated into SageMaker and are no longer supported independently. Thus, SageMaker and its functionalities are the only AWS service that thoroughly covers the ML process. The service is therefore unique in the AWS offering.
To highlight the benefits and limitations of using SageMaker, a comparison with other Machine Learning as a Service (MLaaS) offerings from different cloud providers is helpful. However, for the sake of clarity, the following is only based on a comparison with one of Amazons’ largest competitors – Microsoft Azure and its MLaaS “Microsoft Azure Machine Learning Studio.”
Both services provide a UI-based and fully managed cloud-based tool that supports the overall workflow of building, training, and deploying ML models quickly. However, after looking at the respective service descriptions as well as various discussions and reviews in online forums, it appears that AWS SageMaker stands out, especially for its high flexibility in creating and training custom ML models. This is demonstrated by the fact that developers and data scientists always have full freedom in the way they are creating and training their models. Expressed in the sense of bring-your-own-algorithms and frameworks, use of integrated models and algorithms or own creation with Jupyter Notebooks, and the freedom for users to decide which instances with which specifications should be used for which purpose in the ML process.
Azure Machine Learning Studio also offers these capabilities in general, but not on the same scale. Here, on the other hand, the focus seems to be more on simplification, as common functions such as data access, data cleaning, scoring, and testing models and deployment, etc., can be performed through a drag-and-drop user interface with no programming required. Custom models can be created without managing cloud instances, Python coding, or using Jupyter notebooks.
The limitations of SageMaker result from its advantages, whereby it should be noted that these, concerning ML knowledge and skills, are user-dependent. It turns out, while the higher flexibility compared to Azure Machine Learning Studio was emphasized above, this is probably more expressed in complexity for a machine learning beginner or users with limited ML and programming knowledge. Depending on cloud computing skills, this complexity is further enhanced as users are not shielded from other cloud operations tasks such as managing instances and resources.
## Pricing
The pricing model of Amazon SageMaker is based on individual usage. The costs consist of the resources or instances for the computing, storage, and data processing services required to create, train, and deploy the ML models. Billing is done on a per-second basis with no minimum charge or upfront fees. The exact pricing varies by instance type as well as by region of provisioning. Especially GPU instances, which are often more suitable for accelerated computations in machine learning, are significantly more expensive. As a comparison of On-demand usage, one of the most powerful CPU instances (located in US Western Northern California) costs about 7.31 USD per hour. In contrast, one of the most powerful GPU instances costs up to 32.77 USD per hour.
Some of the currently 22 integrated services are free for usage, including SageMaker Pipelines, Autopilot, Experiments, Debugger, Model Monitor, Clarify, and JumpStart. The setup of authorization profiles and access to SageMaker Studio, the fully integrated development environment, and all other AWS services embedded in Studio are always free.
The table below shows a calculation example of a typical use case of working with SageMaker Studio Notebooks. The example associated numbers are derived from AWS. However, since this Case Study demonstrates the practical use of SageMaker via CLI and an SDK with a similar use case, this example is particularly well suited.
In the calculation example, a user creates a new notebook in a TensorFlow kernel, assigns an ml.c5.xlarge instance, and works for one hour on this notebook. Then he opens an already existing notebook (also previously set with an ml.c5.xlarge instance), which automatically opens in the same ml.c5.xlarge instance that is also running the other notebook. After another one hour of simultaneously working on both notebooks, the user got charged for two hours of ml.c5.xlarge instance usage. As he worked simultaneously on both notebooks, each kernel application’s time is metered for 0.5 hours, which in sum adds up to one hour.
**Pricing Example:**
| Kernel Application | Notebook Instance | Hours | Cost per hours | Total |
|:------------------:|:-----------------:|:-----:|:--------------:| -----:|
| TensorFlow | ml.c5.xlarge | 1 | $0.24 | |
| TensorFlow | ml.c5.xlarge | 0.5 | $0.12 | |
| Data Science | ml.c5.xlarge | 0.5 | $0.12 | |
| | | | | $0.48 |
*Source: AWS*
Finally, it should be noted that in some application scenarios / phases of the ML process, such as data preparing or training and running of a model, data is uploaded in S3 as input for a processing job. After the processing job with SageMaker, the output data, which is roughly the same size, is stored back in S3. Accordingly, this incurs additional costs for the user.