Detecting Labels using the API
Developers interact with Amazon Rekognition using the AWS Command-Line Interface (AWS CLI), the AWS SDK, and REST clients. This section will use the boto3
module for Python.
Uploading the images to S3
Use the AWS CLI or the Amazon S3 console to create a bucket for your test images. This example command will provision the cv-on-aws-book-
xxxx bucket in Ohio Region (us-east-2). Bucket names must be globally unique, so specify any random suffix. Next, record this value as you’ll need it later:
$ aws s3 mb --region us-east-2 s3://cv-on-aws-book-nbachmei make_bucket: cv-on-aws-book-nbachmei
Next, upload the sample files from the book’s GitHub repository. You can complete this step using the following command:
$ aws s3 sync 02_IntroRekognition/images s3://cv-on-aws-book-nbachmei/chapter_02/images --region us-east-2
Initializing the boto3 client
Open your Jupyter Notebook using the steps from Chapter 1. Import DetectLabel.ipynb...