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
feita há 10 meses244 visualizações
1 Resposta
0
Resposta aceita

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
ESPECIALISTA
respondido há 10 meses
  • thank you, I wll try on this way.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas