我正在尝试在我们公司的网站上嵌入仪表板。我正在使用 .NET Core 2.1 和 AWSSDK 3.3.1.12 我们正在使用 API Gateway 在 AWS Lambda 上运行我们的网站。
我已按照这 2 个指南设置权限并设置端点以获取嵌入仪表板 URL
我已设法获取嵌入仪表板 URL
var getDashboardUrl = await client.GetDashboardEmbedUrlAsync(new GetDashboardEmbedUrlRequest
{
AwsAccountId = awsAccountId,
IdentityType = EmbeddingIdentityType.QUICKSIGHT,
DashboardId = testDashboardId,
SessionLifetimeInMinutes = 100,
ResetDisabled = true,
UndoRedoDisabled = false,
Namespace = "default",
UserArn = $"arn:aws:quicksight:us-east-1:{awsAccountId}:user/default/{email}",
StatePersistenceEnabled = true
});
并使用 Quicksight javascript SDK 嵌入仪表板,但出现错误。它显示正在加载仪表板,但加载后会显示一条消息“我们无法显示此页面(未授权) ”
function embedDashboard(embedUrl) {
let containerDiv = document.getElementById("embeddingContainer");
let options = {
// replace this dummy url with the one generated via embedding API
url: embedUrl,
container: containerDiv,
scrolling: "no",
height: "700px",
width: "1000px",
footerPaddingEnabled: true
};
dashboard = QuickSightEmbedding.embedDashboard(options);
}
如果您需要更多信息,请告诉我