Hello Community,
In our project, we’re using QuickSight to display analytics in a website using embedded URLs with AWS SDK. Our tech stack consists of Node.js and React.js.
We’re pulling data from PostgreSQL DB into QuickSight and have an enterprise-level account. We’ve created analytics graphs and generated embedded URLs for dashboards which are rendered in iframes for anonymous users.
We have a new requirement: each user has a specific organization ID and partner ID. When users log into the React application, we generate an embedded URL. We need to pass the organization ID for the logged-in user so they only see analytics graphs for their organization, not all organizations.
We’ve set up RLS in QuickSight, but here’s the challenge: when users who aren’t registered in QuickSight log into the website, we need to pass their organization ID to the GeneratingEmbeddedUrl function so QuickSight can filter data and generate URLs specific to their organization.
const params =
{
AwsAccountId: process.env.AWS_ACCOUNT_ID,
DashboardId: dashboardId,
IdentityType: EmbeddingIdentityType.QUICKSIGHT,
SessionLifetimeInMinutes: 600,
UndoRedoDisabled: true,
ResetDisabled: true,
UserArn: process.env.AWS_USER_ARN,
Parameters: { origin_organization_id: [‘229’] // Matches RLS field
} };
const command = new GetDashboardEmbedUrlCommand(params); c
onst response = await this.quicksightClient.send(command);
return response.EmbedUrl;
I’m attaching a screenshot of the Row Level Security settings for our dataset. Any help would be appreciated.