rekognition index_faces : Unable to get object metadata from S3

0

Hi, I created a s3 bucket named: digiphoto-lumen-avventori-pdv-test (without special chars) in the us-east-1 region. I created a Role with: CloudWatchLogsFullAccess, AmazonS3FullAccess, AmazonDynamoDBFullAccess, AmazonRekognitionFullAccess I created a lambda function and a trigger for faces indexing.

I created the dynamodb table in same region (us-east-1) and the collection like this:


aws rekognition create-collection --collection-id avventori --region us-east-1

but when I uploading an image, the trigger raise the hateful exception: * An error occurred (InvalidS3ObjectException) when calling the IndexFaces operation: Unable to get object metadata from S3. Check object key, region and/or access permissions.*

Trying to detect faces from powershell CLI

aws rekognition detect-faces --region us-east-1 `
--image '{""S3Object"" : {""Bucket"" : ""digiphoto-lumen-avventori-pdv-test"", ""Name"" : ""image1.png"" }}'

the request's succeded (200 OK with correct response) Why python script fails ? What is the problem ? The key is correct, the region is correct the bucket is accessible with full permissions.

the python script starts with region:


s3 = boto3.client( 's3', region_name='us-east-1' )
rekognition = boto3.client( "rekognition", region_name='us-east-1' )
dynamodbTableName = "avventori"
dynamodb = boto3.resource( 'dynamodb', region_name='us-east-1' )
avventoriTable = dynamodb.Table( dynamodbTableName )

Cannot exit from this impasse. Can anyone give me a suggestion ? thanks

  • Can you share the full indexFaces python script code that will be helpful to answer the question? Also can you try DetectFaces with the same python script that lambda is running that will also be helpful to understand what's the issue

Luca
已提问 3 个月前105 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容