Skip to content

Instantly share code, notes, and snippets.

@madan712
Created December 31, 2023 15:22
Show Gist options
  • Save madan712/f8bb91ac04577ebef5815c522ffe1be0 to your computer and use it in GitHub Desktop.
Save madan712/f8bb91ac04577ebef5815c522ffe1be0 to your computer and use it in GitHub Desktop.
AWS SDK javascript v3 to get quicksight embed url
const getEmbedUrl = async (qsClient, dashboardId) => {
console.log(`Fetching embed url`);
const param = {
AwsAccountId: AWS_ACCOUNT_ID,
DashboardId: dashboardId,
IdentityType: "IAM",
UndoRedoDisabled: true,
ResetDisabled: true
};
const command = new GetDashboardEmbedUrlCommand(param);
const response = await qsClient.send(command);
console.log(JSON.stringify(response));
return response.EmbedUrl.toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment