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 年前427 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则