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
gefragt vor 10 Monaten244 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
EXPERTE
beantwortet vor 10 Monaten
  • thank you, I wll try on this way.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen