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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容