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

已提問 5 年前檢視次數 428 次
1 個回答
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
已回答 5 年前

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

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

回答問題指南