Create Custom Models using Amazon Rekognition Custom Labels

   Go back to the Task List

  « 4. Train the Model    6: Create Client »

5: Setup Development Environment

AWS Cloud9 is a cloud-based integrated development environment (IDE) from Amazon Web Services. In this task, you configure AWS Cloud9 environment with AWS SDK for Python Boto3 in order to program with Amazon Rekognition APIs.

  1. Goto the AWS Cloud9 console and click on the Create environment button.

    Cloud9

  2. On the next screen, enter dojoenvironment as the name and click on the Next step button.

    Cloud9

  3. On the next screen, select Environment type as Create a new instance for environment (direct access). Select Instance type as t2.micro (1 GiB RAM + 1 vCPU). Select Ubuntu Server 18.04 LTS for the Platform. The development environment will have Ubuntu as the operating system. Keep rest of the fields with the default values and click on the Next step button.

    Cloud9

  4. On the next screen, click on the Create environment button.

  5. It will take couple of minutes to create the environment. Wait for the environment to be ready. Once it is ready, you can see bash console window in the bottom part of the screen. It provides console based access to the development machine.

  6. You will now configure the environment for the Python Boto3 SDK. Run the command sudo apt-get update in the console to update the environment.

    Cloud9

  7. Python3 is already installed in the environment. You can check it by running the command python3 –version in the console.

    Cloud9

  8. AWS SDK for Python Boto3 is not installed in the environment. Run the command sudo apt install python-boto3 to install Boto3 package in the environment. When it asks for the confirmation; you type in Y and enter.

    Cloud9

  9. It is always a good practice to upgrade botocore and boto3. Run the commands pip install botocore –upgrade and pip install boto3 –upgrade to upgrade botocore and boto3.

    Cloud9

    Cloud9

  10. The Cloud9 environment is ready for the AWS Machine Learning programming with AWS SDK Boto3. Let’s build a client code which calls Amazon Rekognition APIs to work with the model.