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
asked 3 months ago98 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions