Step 3: Getting started using the AWS CLI and AWS SDK API
After you've set up the AWS CLI and AWS SDKs that you want to use, you can build applications that use Amazon Rekognition. The following topics show you how to get started with Amazon Rekognition Image and Amazon Rekognition Video.
Formatting the AWS CLI examples
The AWS CLI examples in this guide are formatted for the Linux operating system. To
use the samples with Microsoft Windows, you need to change the JSON formatting of
the --image
parameter, and change the line breaks from backslashes (\)
to carets (^). For more information about JSON formatting, see Specifying Parameter Values for the AWS
Command Line Interface.
The following is an example AWS CLI command that's formatted for Microsoft Windows (note that these commands will not run as is, they are just formatting examples):
aws rekognition detect-labels ^ --image "{\"S3Object\":{\"Bucket\":\"
photo-collection
\",\"Name\":\"photo
.jpg\"}}" ^ --regionregion-name
You can also provide a shorthand version of the JSON that works on both Microsoft Windows and Linux.
aws rekognition detect-labels --image "S3Object={Bucket=
photo-collection
,Name=photo
.jpg}" --regionregion-name
For more information, see Using Shorthand Syntax with the AWS Command Line Interface.
Next step
Step 4: Getting started using the Amazon Rekognition console