AWS SageMaker: How not Spend all Your Money

Darya Petrashka
3 min readJul 13, 2022

--

Question: Hi Darya, I also use AWS over at my workplace. I haven’t tested using AWS services in my own personal capacity though. Just wondering how do you manage the expenses to use the SageMaker services? I know that there is a free tier, so am curious whether you are just leveraging the free tier offers, or are you paying extra to use beyond the free tier?

Photo by Jp Valery on Unsplash

Answer: Yes, AWS SageMaker offers a free tier, here you can read the detailed pricing and explanations here. As you can see below, the free tier offer lasts only a limited time (2 months) and after it, you will have to pay regardless of whether you spent all usage hours or not.

AWS Free Tier resources — image provided by the autor

You can use the AWS pricing calculator in order to see how much your project will cost. Personally, when I tried to run a notebook from SageMaker Example Notebooks, I’ve exceeded S3 free tier at some point but it was only $0.03.

You can always check how is it going in Billing Management Console (use dashboard or the Bills tab for a detailed view).

An example of bill details — image provided by the author

I believe that the most important thing is to double-check which instance you use for training and, even more important, for deployment and inference. Keep in mind that example notebooks don’t always use free resources, they can have more powerful and fast instances for speed training or deployment purpose. Make sure that you have cleaned all resources after work. This link to AWS documentation would help to not forget any.

When I started to learn SageMaker, I had one situation. I’d trained a model and then deployed it to ml.m4.xlarge instance for inference. And I forgot to delete it! It cost $0.24 per hour (and it wasn’t in the free tier), so after a while, I discovered that I spent $25 😁 I was confused and wrote to support. I received a nice friendly message with explanations about the free tier conditions. And they kindly gave me a credit for this amount. I was so happy! So I learned my lesson and now I always check if I cleaned up resources.

An example of a monthly SageMaker bill — image provided by the author

As an example, several months ago I spent $0.89 for SageMaker (by running several example notebooks). As you can see on the screenshot above, different instances have different prices, and the more advantageous instance the higher price. Keep in mind that the price also depends on the region you chose.
I hope that this answer will help you to avoid unnecessary costs and make your AWS journey amazing!

--

--

Darya Petrashka

Data Scientist | ML-engineer | AWS Community Builder. Writing about data career and the beauty of data. Sharing useful tips and technical tutorials.