调用IndexFaces操作时发生InvalidS3ObjectException [英] InvalidS3ObjectException when calling the IndexFaces operation
问题描述
我正在尝试以下教程
这里有一些需要考虑的技巧,以防其他人遇到此问题:
- 确保S3& Rekognition使用同一区域即 S3存储桶应在与创建Rekognition集合的区域相同的区域中创建。
- 由于Amazon Rekognition支持 .jpg 和 .png 格式,因此请确保文件名& CLI index-faces 命令中引用的格式与S3存储桶中的实际文件匹配。
希望这会有所帮助。
I am attempting the following tutorial
So I replaced some part with my own bucket and key(file) name:
aws rekognition index-faces --image "{\"S3Object\":{\"Bucket\":\"testbucket\",\"Name\":\"testfile.png\"}}" --collection-id=rekVideoBlog --detection-attributes=ALL --external-image-id=Andy --region us-west-2
(assume testbucket is my bucket name and testfile is the file I uploaded and made public). Is this correct?
I have made sure to set the bucket and object public etc but I keep getting an error:
An error occurred (InvalidS3ObjectException) when calling the IndexFaces operation: Unable to get object metadata from S3. Check object key, region and/or access permissions.
I also tried to access my bucket using:
aws s3 ls s3://testbucket
and I am able to display the content fine
are you currently facing this error : "An error occurred (InvalidS3ObjectException) when calling the IndexFaces operation: Unable to get object metadata from S3. Check object key, region and/or access permissions"?
I was able to run the sample Amazon Rekognition CLI command "index-faces" from the Amazon Rekogniton tutorial without any error as illustrated in the screenshot below :
Here's some tips for consideration in-case anyone else runs into this issue :
- Make sure both S3 & Rekognition are using the same region i.e S3 bucket should be created in the same region as where Rekognition collection was created.
- Since Amazon Rekognition supports both .jpg and .png formats, make sure the file name & format referenced in the CLI "index-faces" command matches the actual file in your S3 bucket.
Hope this helps.
这篇关于调用IndexFaces操作时发生InvalidS3ObjectException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!