Guide · Amazon QuickSight · Analyses & Dashboard Publishing

QuickSight Analyses and Dashboard Publishing for MCP Servers — CreateDashboardCommand, Versioning, Assets-as-Code

An Amazon QuickSight analysis is the editable workspace where visuals are built; a dashboard is the published, read-only version that viewers access. For MCP server automation, the distinction matters because only dashboards can be embedded or shared with large audiences — and each publish creates a numbered version, giving you full rollback capability. This guide covers creating analyses from templates, publishing dashboards, managing versions, sharing permissions, the assets-as-code workflow via ExportAssetBundleToS3Command + ImportAssetBundleFromS3Command, themes, and folders for dashboard organization.

TL;DR

Create an analysis with CreateAnalysisCommand (from a template or directly from a dataset), then publish it as a dashboard with CreateDashboardCommand. Each dashboard update creates a new version — promote it to production with UpdateDashboardPublishedVersionCommand. Export the entire dashboard (plus its datasets and data sources) as a CloudFormation-compatible bundle with ExportAssetBundleToS3Command, then reproduce it in another environment with ImportAssetBundleFromS3Command. Use CreateFolderCommand + CreateFolderMembershipCommand to organize dashboards by team or product.

Analysis vs dashboard — what each is for

The separation between analysis and dashboard is a core QuickSight design decision with real workflow implications:

This model lets you iterate on an analysis throughout the week and publish a clean version on Monday morning without viewer disruption — a natural fit for MCP server operational dashboards where you want to refine definitions without breaking the view that stakeholders check daily.

Creating an analysis from a dataset

An analysis definition includes the dataset(s), layout, and all visual configurations. Creating one from scratch via API requires specifying the full definition — typically easier to do in the console and then export via ExportAssetBundleToS3Command. However, you can also create a minimal analysis using an existing template ARN:

import { CreateAnalysisCommand, DescribeAnalysisCommand } from "@aws-sdk/client-quicksight";

const ACCOUNT_ID = process.env.AWS_ACCOUNT_ID;

// Create analysis from an existing template
const { AnalysisId, Status } = await qs.send(new CreateAnalysisCommand({
  AwsAccountId: ACCOUNT_ID,
  AnalysisId: "mcp-uptime-analysis",
  Name: "MCP Endpoint Uptime Analysis",
  SourceEntity: {
    SourceTemplate: {
      Arn: "arn:aws:quicksight:us-east-1:123456789012:template/mcp-base-template",
      DataSetReferences: [{
        DataSetPlaceholder: "EndpointMetrics",
        DataSetArn: "arn:aws:quicksight:us-east-1:123456789012:dataset/mcp-endpoint-metrics",
      }],
    },
  },
  Permissions: [{
    Principal: `arn:aws:quicksight:us-east-1:${ACCOUNT_ID}:user/default/automation-user`,
    Actions: [
      "quicksight:RestoreAnalysis",
      "quicksight:UpdateAnalysisPermissions",
      "quicksight:DeleteAnalysis",
      "quicksight:DescribeAnalysis",
      "quicksight:UpdateAnalysis",
    ],
  }],
  Tags: [{ Key: "project", Value: "alivemcp" }],
}));

// Poll until analysis is ready
let analysis;
do {
  await new Promise(r => setTimeout(r, 5000));
  analysis = await qs.send(new DescribeAnalysisCommand({
    AwsAccountId: ACCOUNT_ID,
    AnalysisId: "mcp-uptime-analysis",
  }));
} while (!["CREATION_SUCCESSFUL", "CREATION_FAILED"].includes(analysis.Analysis.Status));

if (analysis.Analysis.Status === "CREATION_FAILED") {
  throw new Error(JSON.stringify(analysis.Analysis.Errors));
}
console.log("Analysis ready:", analysis.Analysis.Arn);

Templates are the preferred way to programmatically create analyses — they encapsulate the full visual definition. Build your template in the console, then export it via CreateTemplateFromAnalysisCommand and version it in source control. See the QuickSight overview for account setup prerequisites.

Publishing a dashboard

Once an analysis exists, publish it as a dashboard. The dashboard is a versioned snapshot — version 1 is created by CreateDashboardCommand; subsequent versions from UpdateDashboardCommand. Neither command affects what viewers see until you call UpdateDashboardPublishedVersionCommand:

import {
  CreateDashboardCommand,
  DescribeDashboardCommand,
  UpdateDashboardPublishedVersionCommand
} from "@aws-sdk/client-quicksight";

// Create dashboard (version 1)
const { DashboardId, VersionArn } = await qs.send(new CreateDashboardCommand({
  AwsAccountId: ACCOUNT_ID,
  DashboardId: "mcp-uptime-dashboard",
  Name: "MCP Endpoint Uptime Dashboard",
  SourceEntity: {
    SourceTemplate: {
      Arn: "arn:aws:quicksight:us-east-1:123456789012:template/mcp-base-template",
      DataSetReferences: [{
        DataSetPlaceholder: "EndpointMetrics",
        DataSetArn: "arn:aws:quicksight:us-east-1:123456789012:dataset/mcp-endpoint-metrics",
      }],
    },
  },
  DashboardPublishOptions: {
    // Allow viewers to export visuals as CSV
    ExportToCSVOption: { AvailabilityStatus: "ENABLED" },
    // Allow viewers to drill down into data points
    DataPointDrillUpDownOption: { AvailabilityStatus: "ENABLED" },
    // Show or hide the visual menu
    VisualMenuOption: { AvailabilityStatus: "ENABLED" },
    // Allow viewers to see underlying data
    ExportWithHiddenFieldsOption: { AvailabilityStatus: "DISABLED" },
  },
  Permissions: [{
    Principal: `arn:aws:quicksight:us-east-1:${ACCOUNT_ID}:user/default/automation-user`,
    Actions: [
      "quicksight:DescribeDashboard",
      "quicksight:ListDashboardVersions",
      "quicksight:UpdateDashboardPermissions",
      "quicksight:QueryDashboard",
      "quicksight:UpdateDashboard",
      "quicksight:DeleteDashboard",
      "quicksight:UpdateDashboardPublishedVersion",
    ],
  }],
}));

// Poll until creation complete
let dash;
do {
  await new Promise(r => setTimeout(r, 5000));
  dash = await qs.send(new DescribeDashboardCommand({
    AwsAccountId: ACCOUNT_ID,
    DashboardId: "mcp-uptime-dashboard",
  }));
} while (!["CREATION_SUCCESSFUL","CREATION_FAILED"].includes(dash.Dashboard.Version.Status));

// Publish version 1 to viewers
const versionNumber = dash.Dashboard.Version.VersionNumber;
await qs.send(new UpdateDashboardPublishedVersionCommand({
  AwsAccountId: ACCOUNT_ID,
  DashboardId: "mcp-uptime-dashboard",
  VersionNumber: versionNumber,
}));

console.log("Published dashboard version:", versionNumber);

Dashboard version management

QuickSight preserves every version. This creates a natural audit trail and rollback mechanism for MCP server operational dashboards:

import {
  UpdateDashboardCommand,
  ListDashboardVersionsCommand
} from "@aws-sdk/client-quicksight";

// Update dashboard (creates version 2, 3, etc. — does NOT publish)
await qs.send(new UpdateDashboardCommand({
  AwsAccountId: ACCOUNT_ID,
  DashboardId: "mcp-uptime-dashboard",
  Name: "MCP Endpoint Uptime Dashboard",
  SourceEntity: {
    SourceTemplate: {
      Arn: "arn:aws:quicksight:us-east-1:123456789012:template/mcp-base-template-v2",
      DataSetReferences: [{
        DataSetPlaceholder: "EndpointMetrics",
        DataSetArn: "arn:aws:quicksight:us-east-1:123456789012:dataset/mcp-endpoint-metrics",
      }],
    },
  },
}));

// List all versions to find stable ones
const { DashboardVersionSummaryList } = await qs.send(new ListDashboardVersionsCommand({
  AwsAccountId: ACCOUNT_ID,
  DashboardId: "mcp-uptime-dashboard",
}));

console.log(DashboardVersionSummaryList.map(v =>
  `v${v.VersionNumber}: ${v.Status} at ${v.CreatedTime}`
).join("\n"));

// Rollback: publish an older version
await qs.send(new UpdateDashboardPublishedVersionCommand({
  AwsAccountId: ACCOUNT_ID,
  DashboardId: "mcp-uptime-dashboard",
  VersionNumber: 1, // roll back to version 1
}));

QuickSight retains all versions. There is no auto-cleanup — delete old versions explicitly with DeleteDashboardVersionCommand if storage accumulates. For MCP server CI/CD pipelines that redeploy dashboards frequently, add a cleanup step that deletes versions older than 30 days.

Assets-as-code: export and import

The assets bundle workflow lets you serialize a complete QuickSight deployment — data sources, datasets, analyses, and dashboards — to S3, then reproduce it in another environment (staging → production, region migration, disaster recovery):

import {
  StartAssetBundleExportJobCommand,
  DescribeAssetBundleExportJobCommand,
  StartAssetBundleImportJobCommand
} from "@aws-sdk/client-quicksight";

// Export: serialize all dashboard dependencies to S3
const exportJobId = `export-${Date.now()}`;
await qs.send(new StartAssetBundleExportJobCommand({
  AwsAccountId: ACCOUNT_ID,
  AssetBundleExportJobId: exportJobId,
  ResourceArns: [
    "arn:aws:quicksight:us-east-1:123456789012:dashboard/mcp-uptime-dashboard",
  ],
  IncludeAllDependencies: true, // include datasets, data sources, analyses
  ExportFormat: "CLOUDFORMATION_JSON", // or "QUICKSIGHT_JSON"
  CloudFormationOverridePropertyConfiguration: {
    // Override data source credentials in the target environment
    DataSources: [{
      Arn: "arn:aws:quicksight:us-east-1:123456789012:datasource/mcp-metrics-redshift",
      Properties: ["Credentials"],
    }],
  },
}));

// Poll export job
let exportJob;
do {
  await new Promise(r => setTimeout(r, 5000));
  exportJob = await qs.send(new DescribeAssetBundleExportJobCommand({
    AwsAccountId: ACCOUNT_ID,
    AssetBundleExportJobId: exportJobId,
  }));
} while (!["SUCCESSFUL","FAILED"].includes(exportJob.JobStatus));

console.log("Export bundle at:", exportJob.DownloadUrl);

The resulting bundle URL contains a time-limited presigned URL to a ZIP file. Download it, store it in your git repository or S3 bucket, and use StartAssetBundleImportJobCommand to reproduce the entire deployment in a target account or region. The CLOUDFORMATION_JSON format produces a CloudFormation template that you can version-control and review in pull requests — a significant operational improvement over manually maintaining console configurations.

Sharing dashboards and setting permissions

Sharing a dashboard with a user grants them quicksight:QueryDashboard — the minimum permission to view and interact with a published dashboard:

import { UpdateDashboardPermissionsCommand } from "@aws-sdk/client-quicksight";

// Share with an individual user
await qs.send(new UpdateDashboardPermissionsCommand({
  AwsAccountId: ACCOUNT_ID,
  DashboardId: "mcp-uptime-dashboard",
  GrantPermissions: [{
    Principal: `arn:aws:quicksight:us-east-1:${ACCOUNT_ID}:user/default/alice`,
    Actions: ["quicksight:DescribeDashboard", "quicksight:QueryDashboard"],
  }],
}));

// Share with an entire group
await qs.send(new UpdateDashboardPermissionsCommand({
  AwsAccountId: ACCOUNT_ID,
  DashboardId: "mcp-uptime-dashboard",
  GrantPermissions: [{
    Principal: `arn:aws:quicksight:us-east-1:${ACCOUNT_ID}:group/default/mcp-viewers`,
    Actions: ["quicksight:DescribeDashboard", "quicksight:QueryDashboard"],
  }],
}));

For publicly embedded dashboards (anonymous users), permissions are managed through the GenerateEmbedUrlForAnonymousUserCommand call rather than the Permissions array — anonymous users do not have QuickSight user identities. See the embedding guide for the full anonymous embed flow.

Organizing dashboards with folders

QuickSight folders work like filesystem directories — a dashboard can belong to multiple folders simultaneously, and folder membership is managed via CreateFolderMembershipCommand:

import {
  CreateFolderCommand,
  CreateFolderMembershipCommand
} from "@aws-sdk/client-quicksight";

const { FolderId } = await qs.send(new CreateFolderCommand({
  AwsAccountId: ACCOUNT_ID,
  FolderId: "mcp-ops-folder",
  Name: "MCP Operations",
  FolderType: "SHARED",
  Permissions: [{
    Principal: `arn:aws:quicksight:us-east-1:${ACCOUNT_ID}:group/default/mcp-viewers`,
    Actions: [
      "quicksight:DescribeFolder",
      "quicksight:ListFolderMembers",
    ],
  }],
}));

await qs.send(new CreateFolderMembershipCommand({
  AwsAccountId: ACCOUNT_ID,
  FolderId: "mcp-ops-folder",
  MemberId: "mcp-uptime-dashboard",
  MemberType: "DASHBOARD",
}));

Themes for consistent dashboard styling

Apply a custom theme to dashboards to match your product's brand. Themes are referenced by ARN in CreateDashboardCommand:

import { CreateThemeCommand } from "@aws-sdk/client-quicksight";

await qs.send(new CreateThemeCommand({
  AwsAccountId: ACCOUNT_ID,
  ThemeId: "alivemcp-theme",
  Name: "AliveMCP Dark Theme",
  BaseThemeId: "MIDNIGHT", // built-in: "CLASSIC" | "MIDNIGHT" | "RAINIER" | "VEGASGOLD" | "SEASIDE" | "TWILIGHT"
  Configuration: {
    UIColorPalette: {
      PrimaryForeground: "#f5f5f5",
      PrimaryBackground: "#0a0a0a",
      SecondaryForeground: "#c0c0c0",
      SecondaryBackground: "#1a1a1a",
      Accent: "#00c853",         // AliveMCP brand green
      AccentForeground: "#0a0a0a",
      Danger: "#ef5350",
      DangerForeground: "#ffffff",
      Warning: "#ffa726",
      WarningForeground: "#0a0a0a",
      Success: "#00c853",
      SuccessForeground: "#0a0a0a",
      Dimension: "#42a5f5",
      DimensionForeground: "#0a0a0a",
      Measure: "#ab47bc",
      MeasureForeground: "#ffffff",
    },
    DataColorPalette: {
      Colors: ["#00c853","#42a5f5","#ab47bc","#ffa726","#ef5350","#26c6da","#d4e157","#ff7043"],
      MinMaxGradient: ["#1565c0","#00c853"],
    },
    Sheet: {
      Tile: {
        Border: { Show: true },
        Gutter: { Show: true },
      },
      TileLayout: {
        Gutter: { Show: true },
        Margin: { Show: true },
      },
    },
  },
  Permissions: [{
    Principal: `arn:aws:quicksight:us-east-1:${ACCOUNT_ID}:group/default/mcp-viewers`,
    Actions: ["quicksight:DescribeTheme", "quicksight:DescribeThemeAlias", "quicksight:ListThemeAliases", "quicksight:ListThemeVersions"],
  }],
}));

Reference the theme in CreateDashboardCommand by adding ThemeArn: "arn:aws:quicksight:us-east-1:123456789012:theme/alivemcp-theme". Themes also apply to embedded dashboards — the brand appearance is preserved regardless of whether the user accesses the dashboard through the console or an iframe.

Key gotchas

Continue in this series

Related guides: IAM setup for AWS MCP tools · Amazon Forecast for MCP servers · Amazon Personalize for MCP servers