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.
-
Goto the AWS Cloud9 console and click on the Create environment button.
-
On the next screen, enter dojoenvironment as the name and click on the Next step button.
-
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.
-
On the next screen, click on the Create environment button.
-
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.
-
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.
-
Python3 is already installed in the environment. You can check it by running the command python3 –version in the console.
-
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.
-
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.
-
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.