Calling Rekognition Using AWS CLI

I have AWS CLI installed on Windows and I am using Windows Command Prompt.

I'm trying to use Rekognition, but I can't seem to get the commands to work. The closest I got is this:

aws rekognition detect-faces --image S3Object=\{Bucket=innovation-bucket,Name=image.jpg,Version=1\} --attributes "ALL" --region us-east-1

      

This leads to:

Error parsing parameter "-image": expected: ',', received: '}' for input: S3Object = {Bucket = innov-bucket, Name = image.jpg, Version = 1}

Why is he expecting a comma?

EDIT:

When I try to use the format from the documentation, I also get errors:

aws rekognition detect-faces --image '{"S3Object":{"Bucket":"innovation-bucket","Name":"image.jpg"}}' --attributes "ALL" --region us-east-1

      

Error parsing parameter "-image": expected: "=", received "for input:" {"S3Object": {"Bucket": "innovation bucket", "Name": "image.jpg"}}

+3


source to share


1 answer


1) Your AWS CLI should look something like this, this documentation :

aws rekognition search-faces-by-image \
--image '{"S3Object":{"Bucket":"bucket-name","Name":"Example.jpg"}}' \
--collection-id "collection-id" \
--region us-east-1 \
--profile adminuser

      



2) If your AWS CLI is installed on a Windows box, make sure you change "single quotes to double quotes and double quotes to escaped quotes

+3


source







All Articles