AWS-SDK Auth problem on GuardDuty

0

I wrote a code with nodejs which uses createIntelSet method.

but It throws Error below: InternalServerErrorException: The request is rejected because the caller is not authorized to call this API.

I already added the 'AmazonGuardDutyFullAccess' policy to an account, but It's no use. any solutions for it? I maybe losing clue for the API auth...

gumtong
已提問 10 個月前檢視次數 244 次
1 個回答
0
已接受的答案

Hi, what you should probably do first is add a call to getCallerIdentity() . See https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/STS.html#getCallerIdentity-property

It will tell you under which security principal (IAM user or role) you make this GuardDuty request and then you check in this security principal has the credentials to this API that you want to call.

Hope it helps!

Didier

profile pictureAWS
專家
已回答 10 個月前
  • thank you, I wll try on this way.

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

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

回答問題指南