AccessDeniedException when using CreateFaceLivenessSessionCommand

0

Hi, Im using the Rekognition with Javascript V3, on the IAM roles i created inline policy for all actions and resources of Rekognition.

Enter image description here

I can use the IndexFacesCommand, ListFacesCommand and SearchFacesByImageCommand but when calling the CreateFaceLivenessSessionCommand Im having an error of AccessDeniedException. what is the problem? i followed the documentation how to use Rekognition using Javascript V3.

` const rekog = new RekognitionClient({ credentials: fromIni({profile: 'default'}), region: 'ap-southeast-1' });

try {
const command = new CreateFaceLivenessSessionCommand(); const response = await rekog.send(command); console.log(response); }catch(e){ console.log(e) } `

AJ
已提問 1 個月前檢視次數 278 次
3 個答案
0
已接受的答案

After a few days i figure it out, i read the documentation again and also the FAQ's. it's all because of my region. My region was on Singapore, the Face Liveness resources is available only on these regions. US East (N. Virginia), US West (Oregon), Europe (Ireland), Asia Pacific (Tokyo), and Asia Pacific (Mumbai).

https://aws.amazon.com/rekognition/face-liveness/#FAQs

AJ
已回答 1 個月前
0

Hello.

Where is JavaScript running?
For example, if you are running it on a local PC, you will need to check whether the correct IAM policy is attached to the IAM user associated with the set access key.
By the way, does it work if I use the "Administratoraccess" policy?
https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AdministratorAccess.html

If you look at the documentation below, S3 may be involved.
So why not try setting "S3Fullaccess" once?
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/rekognition/command/CreateFaceLivenessSessionCommand/

You can use the OutputConfig option in the Settings parameter to provide an Amazon S3 bucket location. The Amazon S3 bucket stores reference images and audit images. If no Amazon S3 bucket is defined, raw bytes are sent instead.

profile picture
專家
已回答 1 個月前
profile picture
專家
已審閱 1 個月前
  • yes I'm trying it on my local using node.js i'll post the permissions of my IAM

  • Are there any errors in the CloudTrail event history? If you look at CloudTrail's event history, you may be able to see which IAM policies are missing. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html

  • on the cloudtrail i saw the CreateLivenessSession event and has error code of AccessDenied even my IAM has all the permission to rekognition, there's no information about what policy was missing

0

@Riku here's my IAM role permissions, still having an error AccessDeniedException when i call the CreateFaceLivenessSessionCommand but i can call other commands from Rekognition

Enter image description here

AJ
已回答 1 個月前

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

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

回答問題指南