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
질문됨 한 달 전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
답변함 한 달 전
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
전문가
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
  • 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
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠