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
demandé il y a 3 mois105 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions