Amazon SageMaker

In this section, you will learn how to use Amazon SageMaker to test and deploy our Rekognition model. Amazon SageMaker is a modular, fully managed machine learning service that enables developers and data scientists to build, train, and deploy ML models at scale.

The main interface for Amazon SageMaker projects is through Jupyter notebooks. Jupyter is an interactive Python environment designed for rapid iteration. Amazon SageMaker makes deploying and managing Jupyter notebooks easy.

Create an Amazon SageMaker notebook instance

From your Amazon SageMaker console, select Notebook instances then Create notebook instance.

Create notebook instance

Notebook instance settings

Enter a name, such as analogue-gauge-detection, for your notebook instance, leave everything else in this section as the default.

Notebook instance settings

Permissions and encryption

A SageMaker Execution Role has already been created. Select the existing AmazonSageMaker-ExecutionRole- prefixed name role from the pull-down list. The exact role title may differ from that shown below.

Permissions and encryption

Only if no existing AmazonSageMaker-ExecutionRole- prefixed name role exists in the AWS account you will need to select Create a new role from the selection list. If being used in a lab environment, on the pop-up menu select Any S3 bucket to allow the notebook instance to any S3 buckets in your account. Then, click on Create role button on the bottom.

Create notebook instance

Leave the remaining sections as default and click Create notebook instance.

Create notebook instance

Open notebook instance

In the Amazon SageMaker console, select Notebook instances and click on the notebook title you created in the previous step. This will open the control panel to the instance itself.

Create notebook instance

The notebook instance will take a few minutes to initialise. Wait until the instance status moves from Pending to InService on the Amazon SageMaker Notebook Instance console.

SageMaker IAM policy

  • Add the AmazonRekognitionFullAccess policy to the AmazonSageMaker-ExecutionRole-20210111T151866 role.

Open Jupyter notebook

Once the notebook status is InService, open the managed Jupyter notebook by clicking on Open Jupyter.

Open Jupyter

You should see the Jupyter notebook console shown below.

Jupyter notebook console

In the next step you will upload and modify a Jupyter notebook.