With Amazon SageMaker, you pay only for what you use. Building, training, and deploying ML models is billed by the second, with no minimum fees and no upfront commitments. Pricing within Amazon SageMaker is broken down by on-demand ML instances, ML storage, and fees for data processing in hosting instances.
Included with Amazon SageMaker Training and Hosting
When you train your models in Amazon SageMaker and enable Amazon SageMaker Debugger, you can use built in rules for debugging or write your own custom rules, or both. SageMaker Debugger provides a fully managed experience for running both built-in and custom rules as Amazon SageMaker Processing jobs. For built-in rules, there is no charge and Amazon SageMaker Debugger will automatically select an instance type. For custom rules, you will need to choose an instance (e.g. ml.m5.xlarge) and you will be charged for the duration for which the instance is in use for the Amazon SageMaker Processing job.
When you deploy your models as Amazon SageMaker endpoints for real-time inference and enable Amazon SageMaker Model Monitor, you can use built-in rules to monitor your models or write your own custom rules, or both. Model Monitor provides a fully managed experience for running both built-in and custom rules as Amazon SageMaker Processing jobs. For built-in rules with ml.m5.xlarge instance in China (Ningxia) Region, you get up to 30 hours of monitoring aggregated across all endpoints each month, at no charge. Usage in China (Beijing) Region, usage beyond 30 hours in China (Ningxia) Region, or usage for other ML instance types will be charged for the duration for which the instance is in use at the Amazon SageMaker Processing on demand rate.
Choice of Amazon EC2 On-demand and Spot Instances
With Amazon SageMaker you have the choice of choosing from Amazon EC2 On-Demand instances or Amazon EC2 Spot instances. For building, training, and deploying your models on Amazon SageMaker, on-demand ML instances let you pay for machine learning compute capacity by the second, with no long-term commitments. This frees you from the costs and complexities of planning, purchasing, and maintaining hardware, and transforms what are commonly large fixed costs into much smaller variable costs. Pricing is per instance-hour consumed for each instance, from the time an instance is available for use until it is terminated or stopped. Each partial instance-hour consumed will be billed per-second.
For training your ML models, you have the choice of using Amazon EC2 Spot instances with Managed Spot Training. This option can help reduce the cost of training your machine learning models by up to 90%. Once a Managed Spot Training job completes, you can calculate the cost savings as the percentage difference between the duration for which the training job ran and the duration for which you were billed. The cost savings is also visible on the Amazon Web Services management console.
ML General Purpose storage
For model training, Amazon SageMaker provides you with the ability to select up to 6 TB of associated General Purpose (SSD) storage capacity for your training data. For notebook, model training, and model hosting, General Purpose (SSD) storage capacity is also added for temporary data storage. With General Purpose (SSD), you will be charged for this storage. However, you will not be charged for the I/Os consumed.
When hosting your models, data processed by Amazon SageMaker is pulled into and out of model hosting instances.
China (Beijing) region
China (Ningxia) region
Pricing Example #1: Processing
Amazon SageMaker Processing only charges you for the instances used while your jobs are executing. When you provide the input data for processing in Amazon S3, Amazon SageMaker downloads the data from Amazon S3 to local file storage at the start of a processing job in the China (Beijing) region.The data analyst runs a Processing job to preprocess and validate data on two ml.m5.4xlarge instances for a job duration of 10 minutes. She uploads a dataset of 100 GB in S3 as input for the processing job, and the output data which is roughly the same size is stored back in S3.
|Hours||Processing Instances||Cost per hour||Total|
|1 * 2 * 0.167 = 0.334||ml.m5.4xlarge||¥ 8.917||¥ 2.978|
|General Purpose (SSD) Storage (GB)||Cost per hour||Total|
|100 GB * 2 = 200||¥ 1.044||
The sub-total for Amazon SageMaker Processing job = ¥ 2.978;
The sub-total for 200 GB of general purpose SSD storage = ¥ 0.0242;
The total price for this example would be ¥ 3.0022.
Pricing Example #2: Data Wrangler
As a data scientist, you spend three days using Amazon SageMaker Data Wrangler in the China (Beijing) region to cleanse, explore, and visualize your data for 6 hours per day. To execute your data preparation pipeline, you then initiate a SageMaker Data Wrangler job that is scheduled to run weekly.
The table below summarizes your total usage for the month and the associated charges for using Amazon SageMaker Data Wrangler.
|Application||SageMaker Studio Instance||Days||Duration||Total duration||Cost per hour||Cost sub-total|
|SageMaker Data Wrangler||ml.m5.4xlarge||3||6 hours||18 hours||¥ 10.133||¥ 182.394|
|SageMaker Data Wrangler job||ml.m5.4xlarge||-||40 minutes||2.67 hours||¥ 10.133||¥ 27.055|
From the table, you use Amazon SageMaker Data Wrangler for a total of 18 hours over 3 days to prepare your data. Additionally, you create a SageMaker Data Wrangler job to prepare updated data on a weekly basis. Each job lasts 40 minutes, and the job runs weekly for one month.
Total monthly charges for using Data Wrangler = ¥ 182.394 + ¥ 27.055 = ¥ 209.449
Pricing Example #3: Feature Store
You have a web application which issues reads and writes of 25 KB each to the Amazon SageMaker Feature Store in the China (Beijing) region. For the first 10 days of a month, you receive little traffic to your application, resulting in 10,000 writes and 10,000 reads each day to the SageMaker Feature Store. On day 11 of the month, your application gains attention on social media and application traffic spikes to 200,000 writes and 200,000 reads that day. Your application then settles into a more regular traffic pattern, averaging 80,000 writes and 80,000 reads each day through the end of the month.
The table below summarizes your total usage for the month and the associated charges for using Amazon SageMaker Feature Store.
|Day of the month||Total Writes||Total Write Units||Total Reads||Total Read Units|
|Days 1 to 10||100,000 writes
(10,000 writes * 10 days)
(100,000 * 25KB )
(10,000 * 10 days)
(100,000 * 25/4 KB )
|Day 11||200,000 writes||5000000
|Days 12 to 30||1,520,000 writes
(80,000 * 19 days)
(1,520,000 * 25KB)
(80,000 * 19 days)
(1,520,000 * 25/4KB)
|Total chargeable units||45,500,000 write units||12,740,000 read units|
|Monthly charges for writes and reads||
(12.74M read units * ¥ 2.2308 per million reads)
All fractional read units are rounded to the next whole number
Total data stored = 31.5 GB
Monthly charges for data storage = 31.5 GB * ¥ 3.960= ¥ 124.74
Total monthly charges for Amazon SageMaker Feature Store = ¥ 507.5+¥ 24.8204+¥ 124.74 = ¥ 657.06
Pricing Example #4: Training
A data scientist has spent a week working on a model for a new idea in the China (Beijing) region. She trains the model 4 times on an ml.m4.4xlarge for 30 minutes per training run with Amazon SageMaker Debugger enabled using 2 built-in rules and 1 custom rule that she wrote. For the custom rule, she specified ml.m5.xlarge instance. She trains using 3 GB of training data in Amazon S3, and pushes 1 GB model output into Amazon S3. SageMaker creates General Purpose SSD (gp2) Volumes for each Training instance. SageMaker also creates General Purpose SSD (gp2) Volumes for each rule specified. In this example a total of 4 General Purpose SSD (gp2) Volumes will be created. SageMaker Debugger emits 1 GB of debug data to customer’s Amazon S3 bucket.
|Hours||Training Instance||Debug Instance||Cost per hour||Sub-total|
|4 * 0.5 = 2.00||ml.m4.4xlarge||n/a||¥ 12.373||¥ 24.746|
|4 * 0.5 * 2 = 4||n/a||No additional charges for built-in rule instances||¥ 0||¥ 0|
|4 * 0.5 = 2||ml.m5.xlarge||n/a||¥ 2.229||¥ 4.458|
|General Purpose (SSD) Storage for Training (GB)||General Purpose (SSD) Storage for Debugger built-in rules (GB)||General Purpose (SSD) Storage for Debugger custom rules (GB)||Cost per GB-Month||Sub- total|
|Cost||¥ 0||No additional charges for built-in rule storage volumes||¥ 0||¥ 1.044||¥ 0|
The total charges for training and debugging in this example are ¥ 30.248. The compute instances and general purpose storage volumes used by Amazon SageMaker Debugger built-in rules do not incur additional charges.