Closed komus closed 10 months ago
@komus Can you verify that your IAM policies are configured appropriately and ensure the region is correct.
The role associate with the credential should have permission to start face liveness
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "rekognition:StartFaceLivenessSession",
"Resource": "*"
}
]
}
Your backend service/lambda should have permission to create the session id and get the liveness result
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"rekognition:CreateFaceLivenessSession"
],
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "rekognition:GetFaceLivenessSessionResults",
"Resource": "*"
}
]
}
Thank you @phantumcode, the permission was missing from the default AWS amplify permission. The suggestion worked
I am trying to use liveness accesskey and secretkey, but getting the below error
Liveness error: FaceLivenessDetectionError(code: 4, message: "Not authorized to perform a face liveness check.", recoverySuggestion: "Valid credentials are required for the face liveness check.")
The service account is assigned permission policy
AdministratorAccess-Amplify
, can you assist with what is wrong ` let accessKey = "" let secretKey = "" let credentialsProvider = myCredentialProvider { myAWSCredentials(accessKeyId: accessKey, secretAccessKey: secretKey) } self.sessionID = ""