似乎无法在 AWS CLI 中正确获取 AWS Rekognition 的格式

Cannot seem to get format of AWS Rekognition right in AWS CLI

在 AWS CLI 中尝试 运行 AWS Rekognition 并得到以下错误

Error parsing parameter '--image': Invalid JSON: Expecting value: line 1 column 48 (char 47)

也尝试调整 "' 但得到相同的错误消息。感谢所有帮助!

代码如下:

aws rekognition index-faces --image "{\"S3Object\":{\"Bucket\":\"xxx\",\"Name\":"image.PNG"}}" --collection-id "\xxx"\ --detection-attributes \"ALL\" --external-image-id \"xxx\" --region us-west-2

提前致谢!

这是我成功使用的一个命令:

aws rekognition index-faces \
--collection-id Trainers \
--image "S3Object={Bucket=my-bucket,Name=John.jpg}" \
--detection-attributes ALL \
--external-image-id John