Unable to perform operation xray:PutTraceSegments using Cognito Identity pool (unauthenticated user)...

0

I am trying to integrate my React application with XRay for application tracing. I created a Cognito Identity Pool, allowed access for unauthenticated users and attached a proper policy to allow uploading traces to XRay service.

In the React app, I am receiving the credentials but after that, the PutTraceSegmentsCommand fails with the following error:

AccessDeniedException: User: arn:aws:sts::<account-ID>:assumed-role/<user-role>/CognitoIdentityCredentials is not authorized to perform: xray:PutTraceSegments because no session policy allows the xray:PutTraceSegments action.

I am using React v18 and AWS Javascript SDK v3. I am not using the Amplify SDK but @aws-sdk/credential-provider-cognito-identity package.

Kindly suggest a resolution.

Thanky in advance, Naveen.

profile pictureAWS
已提問 1 年前檢視次數 108 次
沒有答案

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

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

回答問題指南