security exception on lambda function

0

When i'm testing my lambda function i get this error

"body": "{\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"no permissions for [indices:data/read/search] and User [name=arn:aws:iam::xxxxxx:role/service-role/testFunction-role-etjiy0ib

But if i go to IAM dashboard and go to the testFunction-role-etjiy0ib, this role has all this permissions: Enter image description here

What am i doing wrong?

2개 답변
0
수락된 답변

Hi, I recommend you redact all endpoints from the code and screenshots.

I see you already asked the same question here: https://repost.aws/questions/QULkoc-0AkQ1yDgN0ANxE7lg/lambda-function-error-list-indices-must-be-integers-or-slices-not-str Have you tried the recommendations and managed to get the print to show? Do you have a stack trace that indicates where its failing?

It seems you are not passing a JSON object to the function using the Test method but rather a list of objects. Could you please check that?

I also recommend you go through a workshop like this: https://aws.amazon.com/getting-started/hands-on/run-serverless-code/ to learn more about Lambda.

Hope it helps Jon

profile pictureAWS
전문가
답변함 일 년 전
0

I'm facing the same error (security exception). Were you able to resolve this?

Kumuda
답변함 5달 전

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

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

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

관련 콘텐츠