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.-_]

gefragt vor 5 Jahren427 Aufrufe
1 Antwort
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
beantwortet vor 5 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen