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 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南