AWS Quicksight GenerateEmbedUrlForAnonymousUser policy AccesDeniedException

Viewed 262

I have wierd issue with AWS . So 2 days ago everything was working fine with the policy thing and premissions but today when it ested seems that i have trouble with premissions. I am getting this error in my server:

AccessDeniedException: User: arn:aws:iam::myId:user/myemail@email.com is not authorized to perform: quicksight:GenerateEmbedUrlForAnonymousUser on resource: arn:aws:quicksight:eu-west-1:myId:namespace/default with an explicit deny in an identity-based policy

My policy looks like this:

{
"Version": "2012-10-17",
"Statement": [
    {
        "Effect": "Allow",
        "Action": [
            "quicksight:GenerateEmbedUrlForAnonymousUser"
        ],
        "Resource": [
            "arn:aws:quicksight:eu-west-1:myId:namespace/default",
            "arn:aws:quicksight:eu-west-1:myId:dashboard/dashId",
            "arn:aws:quicksight:eu-west-1:myId:dashboard/dashId",
            "arn:aws:quicksight:eu-west-1:myId:dashboard/dashId"
        ]
    }
]

}

I tried some of the things from this thread but it didnt help.

The code in the server (nodejs) looks like this:

const experienceConfiguration = {
    "Dashboard": {
        "InitialDashboardId": "dashId"
        
    }
};
quicksight.generateEmbedUrlForAnonymousUser({
    'AwsAccountId': 'myId',
    'Namespace': 'default',
    'AuthorizedResourceArns': ["arn:aws:quicksight:eu-west-1:myId:dashboard/dashId"],
    'ExperienceConfiguration': experienceConfiguration,
    'SessionLifetimeInMinutes': 600

}, function (err, data) {
    console.log('Errors: ');
    console.log(err);
    console.log('Response: ');
    console.log(data);
    res.send(data)
})
0 Answers
Related