DEV Community

Simbo Asante Ntiro
Simbo Asante Ntiro

Posted on

How do you do ML on AWS?

In the last decade, there has been a huge leap forward in Artificial Intelligence and Machine Learning mainly because of the massive increase in data being produced today by web/mobile applications and IOT devices on the internet, the great improvement in ML algorithms, and the availability of the Cloud's scalable compute resources for training and deploying models.

I'll be telling you about managed services on Amazon Web Services that don't require AI/ML expertise and services you can use to run custom models as well.

What is Machine Learning anyways?

Machine learning can be described as methods that leverage data to improve performance on a set of tasks. It's a really important part of Artificial Intelligence.
Machine learning behind services like Alexa, Google Maps' commute estimation, and even your FYP on Tik-Tok!
So its a really huge part of our modern lives.

Managed services on AWS

If you are interested in AI/ML and don't know much about it you can use Amazon Web Service's managed services such as:

  • Amazon Textract
    This service automatically extracts printed text, handwriting, and other data from scanned documents.

  • Amazon Translate
    As the name implies, Amazon Translate is a text translation service that uses ML to provide high-quality translation on demand. It can be used to translate unstructured text or build apps that work in many languages.

  • Amazon Comprehend
    This service uses something called Natural Language Processing (NLP) to find insights and relationships in text. It can be used for things like Sentiment Analysis.

  • Amazon Personalize
    This is a Machine Learning service that helps create individual recommendations for customers. It can really improve customer engagement through product recommendations and even tailored search results.

  • Amazon Polly
    This service turns text into lifelike speech, making it possible to create applications that talk. This is called Text-to-Speech (TTS). This is great for improving accessibility of an app. Unfortunately it only supports 8 languages (at the time of
    posting).

  • AWS Rekognition
    This is a service that makes it easy to add video and image analysis to applications. It uses proven highly scalable deep learning technology developed by Amazon's computer vision scientists and requires no machine learning expertise to use.
    By using Rekognition Custom Models you can identify objects and scenes in images that are specific to your business needs. For example, you can build a model to detect unhealthy plants.

Build your own models on AWS

You can use AWS's large amount of compute and GPU's to train your custom models or you can use Sagemaker.

Amazon Sagemaker

Amazon Sagemaker can be used to train, then directly deploy ML models to a production ready environment. It has very many features one of which is:

  • SageMaker Studio
    If you have played around with Data Science and Machine Learning you are very familiar with Jupyter Notebooks and Google Colab, well SageMaker has you covered! You can; prepare data for machine learning ,build and train machine learning models, deploy the models and monitor the performance of their predictions and even track and debug the machine learning experiments!

  • SageMaker Training Compiler
    This service allows you to create clusters if GPU containers that can be used to train & tune your models. It can also help you automate your Deep Learning Workflows.

After you build and train your models, Amazon SageMaker also makes it easy for you to deploy them for predictions using SageMaker hosting services.

You can programmatically deploy a model using an AWS SDK,You can programmatically deploy a model using an AWS SDK or even through the SageMaker console. You can deploy a model with a Python wrapper file and get back a HTTP endpoint for your inference.

Fully Managed ML Services Vs Building Your Own Model

There are clear advantages of using managed services over the non-managed ones.
As is the norm when dealing with cloud services the difference between Fully Managed Services and Bespoke solutions usually comes down to a Cost-Performance trade-off. Usually a Managed Service will cost more upfront but has no Operational Overhead, and the opposite would be true for a Bespoke solution. But if you have no experience with ML or have a very small scale application the best option would be to use AWS' managed services for ML.

Cheers! And happy tinkering!

Top comments (0)