Skip to content

SearchUsersByImage

Source: src/AWS/Rekognition/SearchUsersByImage.ts

Runtime binding for rekognition:SearchUsersByImage — search a face collection for users matching the largest face in a supplied image.

The binding takes no arguments and grants the function rekognition:SearchUsersByImage on * (Rekognition data-plane resources such as collections, users, and jobs are routinely created at runtime, so their identifiers are unknown at deploy time). Provide the implementation with Effect.provide(AWS.Rekognition.SearchUsersByImageHttp).

// init
const searchUsersByImage = yield* AWS.Rekognition.SearchUsersByImage();
// runtime
const result = yield* searchUsersByImage({
CollectionId: "tenant-42",
Image: { Bytes: imageBytes },
});
const bestUser = result.UserMatches?.[0]?.User?.UserId;