We’re running a multi-tenant SAAS, so each client has an AWS account.
We use QS to make analytics and reporting, and we could make this work through CDK.
The first step is to call the SDK “CreateAccountSubscription”, we’re calling it through a custom lambda. This works when the lambda policy is
resources: "*",
actions: "*"
But for some reason when we set
resource: "*",
actions: "quicksight:*"
And the error is “Not authorised to do this action”, so no way of knowing what kind of authorisation it needs to do this creation.
I would prefer not leaving “*” in my policy, so if someone know exactly it would very appreciable
It is indeed strange that it works on all actions but not on quicksight-specific actions. There appears to be an issue with how permissions are set for the role Lambda is using. Some ideas to help you figure out the issue:
Check the IAM Role Attached to the Lambda Function: Do you have any Actions set to Deny? if you do, they will take precedence. Check for Resource Restrictions: if your IAM policy has resource restrictions, make sure the resources you’re trying to access with QuickSight are included in the policy.
Instead of using quicksight:*, try specifying the exact action that you’re trying to perform. For example, if you’re trying to create a new account subscription, you might need to use quicksight:CreateAccountSubscription.
Use AWS CloudTrail to Identify the Missing Permission: AWS CloudTrail logs every API call made in your AWS account. You can use CloudTrail to identify the exact permission that’s missing. Look for the API call that’s failing and check the error message. The error message should tell you what permission is missing.
Contact AWS Support: If all else fails, you might need to contact AWS Support.
Error: creating AWS QuickSight Account Subscription (sampleaccountforquicksight): AccessDeniedException: You are not authorized to perform this action
what else do I need to have? @Koushik_Muthanna