AWS Rekognition validation error while adding faces to collection

0

Hi ,

I am trying to add the faces to the collection

var params = {
CollectionId: "aws:rekognition:us-east-1:xxxx:collection/collectionidnewbatch",
DetectionAttributes: [
],
ExternalImageId: "testphotoid",
Image: {
S3Object: {
Bucket: "parentbucket/nested/bucket",
Name: "ab1"
}
}
};
rekognition.indexFaces(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data);
});

and getting following error

"image.s3Object.bucket' failed to satisfy constraint: Member must satisfy regular expression pattern: [0-9A-Za-z.-_]

demandé il y a 5 ans427 vues
1 réponse
0

Hi,

From the code snippet, it looks like the issue is that you are not specifying the bucket and name correctly. It should probably be:

Bucket: "parentbucket",
Name: "nested/bucket/ab1"

The S3 bucket needs to be the actual bucket name. Path details are part of the object name, not the bucket name.

There's example code in https://docs.aws.amazon.com/rekognition/latest/dg/add-faces-to-collection-procedure.html if that's helpful.

Hope this helps,
Jonathan

AWS
répondu il y a 5 ans

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