Grafana Dashboard Deployer
What this skill does
Provisions Amazon Managed Grafana workspaces and dashboards with
production-grade defaults across five core domains: workspace creation
with authentication (SSO/IAM Identity Center), data source integration
(CloudWatch, AMP/Prometheus, Timestream, OpenSearch, X-Ray), dashboard
JSON model design (panels, templating, time range), alerting (rules,
notification policies, contact points), and IAM role configuration for
data source access. Emits a READY_TO_DEPLOY checklist with
copy-pasteable verification commands.
Activation keywords
create Grafana workspace, Grafana dashboard, Grafana data source,
CloudWatch data source, Prometheus data source, AMP workspace, Timestream
data source, OpenSearch data source, X-Ray data source, Grafana alerting,
alert rules, notification policy, contact point, IAM Identity Center,
SSO authentication, Grafana Enterprise, Grafana Incident, Grafana OnCall,
IAM role for Grafana, workspace API key, service managed IAM role.
Invocation contract (hard requirement)
When this skill is invoked with a Grafana-provisioning request (workspace
name, authentication mode, data sources, dashboard requirements, or a
partial configuration), the agent MUST respond with the READY_TO_DEPLOY
checklist defined in the section "Output format" using the literal
all-caps labels WORKSPACE:, VERDICT:, CHECKLIST:, and
VERIFICATION_COMMANDS:. Do NOT preface the checklist with prose,
headings, or disclaimers — emit the block as the first lines of the
response. This contract is what assertion-based evals and downstream
provisioning pipelines rely on; deviating from the literal labels breaks
automation silently.
Mindset
One-line takeaway: an Amazon Managed Grafana workspace is not just
"Grafana on AWS" — it is a managed integration boundary where the
authentication mode (IAM Identity Center vs SAML), the data source IAM
role (service-managed vs customer-managed), and the Grafana version
(Standard vs Enterprise) are decided at workspace creation and cannot
all be changed in place.
Three misconceptions dominate Grafana workspace misdesign at provisioning
time:
"I can switch authentication modes after creation." The
authentication mode is set at workspace creation via
authenticationProviders. Switching from SAML to IAM Identity Center
(or vice versa) requires recreating the workspace. Plan the
authentication strategy before calling create-workspace.
"Data sources just need a URL — IAM handles the rest." Managed
Grafana data sources require either a service-managed IAM role
(Grafana creates and manages it) or a customer-managed IAM role
with specific read permissions for each data source service
(CloudWatch, AMP, Timestream, etc.). Without the correct IAM role
permissions, data sources return permission errors on every query.
"Alerting is just Grafana's built-in alert manager." Managed
Grafana alerting has three layers that must all be configured: alert
rules (the condition), notification policies (the routing), and
contact points (the destination). Missing any layer means alerts fire
but go nowhere, or contact points exist but nothing routes to them.
Quick navigation
| Section |
What it covers |
When to read it |
| Quick reference |
Deployment checklist + workspace decision gate |
Before any deployment |
| § Mindset |
Authentication immutability, IAM role gap, alerting layers |
Understanding the model |
| § Prerequisites |
IAM Identity Center, AMP workspace, VPC, data source roles |
Before producing the plan |
| § Workspace selection |
Standard vs Enterprise decision matrix |
Choosing the right tier |
| § Provisioning procedure |
10-step deploy: workspace, auth, data sources, dashboard, alerting, IAM, AMP, Enterprise |
When building the deploy plan |
| § Common patterns |
Boilerplate for workspace, CloudWatch, AMP, dashboard JSON, alerting |
Boilerplate lookup |
| § Output format |
Structured output template with VERDICT, CHECKLIST, VERIFICATION_COMMANDS |
Formatting the response |
| § STRICT output contract |
Required structure + FORBIDDEN patterns |
Validating the output |
| § NEVER |
Top 5 anti-patterns |
Review before risky operations |
| § Expert heuristic |
Data source selection + dashboard panel layout strategy |
Design decisions |
Quick reference — deployment checklist
| Dimension |
Requirement |
Step |
| Workspace name |
Globally unique |
Step 1 |
| Authentication |
IAM Identity Center (recommended) or SAML |
Step 1 |
| Grafana version |
Standard or Enterprise |
Step 1 |
| IAM role |
Service-managed (auto) or customer-managed (custom) |
Step 2 |
| Data source: CloudWatch |
IAM role with cloudwatch:GetMetricData, logs:DescribeLogGroups |
Step 3 |
| Data source: AMP |
AMP workspace ARN + IAM role with aps:QueryMetrics |
Step 3 |
| Data source: Timestream |
IAM role with timestream:Select |
Step 3 |
| Data source: OpenSearch |
OpenSearch endpoint + IAM role with es:ESHttpGet |
Step 3 |
| Data source: X-Ray |
IAM role with xray:GetTraceSummaries |
Step 3 |
| Dashboard JSON |
Panels, templating variables, time range, datasource ref |
Step 4 |
| Alert rules |
Condition, evaluation interval, for duration |
Step 5 |
| Notification policies |
Routing by labels/severity |
Step 5 |
| Contact points |
SNS, Slack, email, PagerDuty, webhook |
Step 5 |
| AMP workspace |
Exists and is ACTIVE (if using Prometheus data source) |
Step 6 |
| Enterprise features |
Incident, OnCall, reporting, SAML team sync |
Step 7 |
Prerequisites (verify before provisioning)
Before emitting provisioning commands, verify these prerequisites. If any
are missing, the verdict is PREREQUISITES_MISSING with a specific gap
citation.
| Prerequisite |
Why it matters |
How to verify |
| AWS account with Grafana access |
Cannot provision without it |
aws sts get-caller-identity |
| Region selected |
Managed Grafana is region-scoped |
aws configure get region |
| IAM Identity Center enabled (for SSO) |
Recommended auth mode; avoids separate SAML setup |
aws sso-admin list-instances |
| AMP workspace ACTIVE (if Prometheus data source) |
Grafana queries the AMP workspace via remote read |
aws amps list-workspaces |
| OpenSearch domain ACTIVE (if OpenSearch data source) |
Grafana queries via the domain endpoint |
aws opensearch list-domain-names |
| KMS key (for workspace encryption) |
Grafana workspace data encryption |
aws kms describe-key --key-id <key-id> |
| VPC + subnets (for VPC-attached data sources) |
Private networking to internal data sources |
aws ec2 describe-subnets |
| SNS topic (for alert contact points) |
Grafana alert notifications via SNS |
aws sns list-topics |
If any prerequisite is missing, output VERDICT: PREREQUISITES_MISSING
and cite the specific gap.
Workspace tier selection (Standard vs Enterprise)
| Tier |
Key features |
Cost |
Use when |
| Standard |
Core Grafana, 5 data source types, basic alerting, IAM Identity Center auth |
Lower |
Most observability workloads, team-level dashboards |
| Enterprise |
All Standard + Enterprise plugins, SAML, team sync from IdP, reporting, Incident, OnCall, audit logs |
Higher |
Enterprise SSO, on-call management, compliance reporting, incident response |
Immutability note: the Grafana version (Standard vs Enterprise) is
set at workspace creation via the grafanaVersion or license type.
Upgrading from Standard to Enterprise is supported via AWS support
ticket; plan the tier before creating the workspace.
10-step provisioning procedure
Step 1 — Workspace creation + authentication
The workspace is the top-level resource. Authentication mode is decided
here and is difficult to change post-creation.
aws grafana create-workspace \
--workspace-name <workspace-name> \
--account-access-type CURRENT_ACCOUNT \
--authentication-providers AWS_SSO \
--permission-type SERVICE_MANAGED \
--data-sources CLOUDWATCH PROMETHEUS XRAY \
--grafana-version 10.4 \
--description "Production observability workspace"
Authentication providers:
AWS_SSO — IAM Identity Center (recommended). Integrates with
corporate IdP via SAML or external IdP providers.
SAML — direct SAML 2.0 integration (requires SAML metadata URL/JSON).
Permission types:
SERVICE_MANAGED — Grafana manages IAM roles for data sources
automatically. Simpler but less control over permissions.
CUSTOMER_MANAGED — you provide a customer-managed IAM role with
explicit permissions per data source. Required for fine-grained
access control and compliance.
Common mistake: choosing SERVICE_MANAGED for a compliance workload.
Service-managed roles grant broad read across all data sources of the
configured types. For compliance (least-privilege), use CUSTOMER_MANAGED.
Step 2 — IAM role for data source access
Service-managed (auto-created): Grafana creates an IAM role with
permissions scoped to the configured data source types. No manual IAM
configuration needed.
Customer-managed role trust/inline policy JSON and the workspace role-association commands moved verbatim to references/provisioning-cli-commands.md (Step 2 section).
Load on demand when emitting the IAM role portion of a CUSTOMER_MANAGED deployment plan.
Step 3 — Data source configuration
Managed Grafana supports five native AWS data source types. Each requires
specific configuration in the Grafana workspace.
CloudWatch (enabled via --data-sources CLOUDWATCH):
- Regions: specify which AWS regions to query
- Namespaces: CloudWatch metric namespaces (e.g., AWS/EC2, AWS/Lambda)
- Log groups: optional, for CloudWatch Logs queries
Prometheus / AMP (enabled via --data-sources PROMETHEUS):
- AMP workspace ARN: the Prometheus workspace to query
- Requires IAM role with
aps:QueryMetrics on the AMP workspace
# Create AMP workspace (if not existing)
aws amps create-workspace \
--workspace-name <amp-name> \
--alias <amp-alias>
# Get AMP workspace ID for Grafana data source config
aws amps describe-workspace --workspace-id <amp-id>
Timestream (enabled via --data-sources TIMESTREAM):
- Database/table selection via Grafana query editor
- Requires IAM role with
timestream:Select and timestream:DescribeEndpoints
OpenSearch (enabled via --data-sources OPENSEARCH):
- OpenSearch domain endpoint URL
- Requires IAM role with
es:ESHttpGet on the domain
X-Ray (enabled via --data-sources XRAY):
- Service map and trace visualization
- Requires IAM role with
xray:GetTraceSummaries and xray:GetTraceGraph
Common mistake: adding a data source type in Grafana without the
matching IAM permission. The data source appears configured but returns
permission errors on every query. Verify IAM role includes the
specific read actions for each data source.
Step 4 — Dashboard JSON model (panels, templating, time range)
Grafana dashboards are JSON documents. The dashboard JSON model defines
panels, templating variables, time range, annotations, and refresh rate.
Dashboard JSON structure, templating-variable guidance, panel-type table, and API import commands moved verbatim to references/data-sources-and-dashboard-json.md (Step 4 section).
Load on demand when authoring or importing dashboard JSON.
Step 5 — Alerting (rules, notification policies, contact points)
Grafana alerting has three layers that must all be configured:
Alert rules — the condition that triggers an alert. Defines the
metric query, threshold, evaluation interval, and for duration:
{
"uid": "cpu-high", "title": "CPU Utilization High",
"condition": "B",
"data": [
{"refId":"A","datasourceUid":"cloudwatch-uid","model":{"namespace":"AWS/EC2","metricName":"CPUUtilization","statistics":["Average"]}},
{"refId":"B","model":{"expression":"$A > 85","type":"threshold"}}
],
"for": "5m",
"labels": {"severity":"warning","team":"platform"}
}
Notification policies — route alert instances to contact points by
label matchers (severity, team, etc.):
{
"routes": [
{"receiver":"sns-platform","object_matchers":[["team","=","platform"]]},
{"receiver":"sns-critical","object_matchers":[["severity","=","critical"]]}
]
}
Contact points — the notification destination (SNS, Slack, email,
PagerDuty, webhook):
{"name":"sns-platform","type":"sns","settings":{"topic":"arn:aws:sns:us-east-1:123456789012:grafana-alerts","authProvider":"aws_iam","region":"us-east-1"}}
Common mistake: creating alert rules without notification policies or
contact points. The rule fires but no notification is sent — the alert
shows as "firing" in the Grafana UI but nothing reaches the on-call team.
Configure all three layers.
Step 6 — AMP workspace integration
AMP workspace creation, remote-write source list, and ACTIVE-status verification moved verbatim to references/data-sources-and-dashboard-json.md (Step 6 section).
Load on demand when wiring the Prometheus data source to AMP.
Step 7 — Grafana Enterprise features (Incident, OnCall)
Enterprise workspace creation command, Incident/OnCall capability notes, and SAML team sync moved verbatim to references/advanced-patterns.md.
Load on demand when the workspace tier is Enterprise.
Common patterns (boilerplate)
Boilerplate snippets (production workspace, customer-managed IAM role, AMP + dashboard import) moved verbatim to references/provisioning-cli-commands.md.
Load on demand when emitting copy-paste deployment commands.
NEVER do these things (top 5)
NEVER create a Managed Grafana workspace without deciding the
authentication mode first. Switching from SAML to IAM Identity
Center (or vice versa) requires recreating the workspace. Plan auth
before create-workspace. IAM Identity Center (AWS_SSO) is the
recommended default.
NEVER use SERVICE_MANAGED permission type for compliance
workloads. Service-managed roles grant broad read across all data
sources of the configured types. For least-privilege and compliance
(PCI-DSS, HIPAA, SOC2), use CUSTOMER_MANAGED with an explicit IAM
role policy scoped to specific resources.
NEVER configure alert rules without notification policies and
contact points. A rule without a notification policy fires but
goes nowhere. A notification policy without a contact point routes
to nothing. Configure all three layers: rule -> policy -> contact.
NEVER query an AMP workspace before verifying it is ACTIVE and
receiving metrics. The AMP workspace must be ACTIVE and the
remote write source must be sending data. Querying an empty AMP
workspace returns no results — not an error — leading to false
confidence that the integration is working.
NEVER hardcode dashboard data sources. Use templating variables
($datasource) so dashboards work across environments and regions.
Hardcoded data source UIDs break when importing dashboards across
workspaces or environments.
Expert heuristic: data source selection and dashboard layout
DATA SOURCE SELECTION
├─ CloudWatch metrics (AWS native)
│ └─ Namespace: AWS/EC2, AWS/Lambda, AWS/RDS, AWS/ApplicationELB
│ • Pros: zero setup, all AWS services
│ • Cons: 1-minute resolution (high-res is 10s with detailed monitoring)
│ • Best for: AWS infrastructure monitoring
│
├─ AMP/Prometheus (custom + application metrics)
│ └─ Remote write from app, CloudWatch agent, OTel collector
│ • Pros: high-resolution (15s or better), PromQL, custom labels
│ • Cons: requires remote write pipeline setup
│ • Best for: application metrics, Kubernetes, custom exporters
│
├─ Timestream (high-volume time-series)
│ └─ IoT, DevOps, application events
│ • Pros: petabyte-scale, SQL queries, cost-effective at high volume
│ • Cons: SQL (not PromQL), different query model
│ • Best for: IoT telemetry, high-cardinality event data
│
├─ OpenSearch (log analytics)
│ └─ Log queries, full-text search, aggregation
│ • Pros: Lucene/PPL queries, aggregation pipelines
│ • Cons: separate from CloudWatch Logs
│ • Best for: centralized log analytics with OpenSearch
│
└─ X-Ray (distributed tracing)
└─ Service maps, trace waterfalls, latency breakdown
• Pros: AWS-native tracing, no separate collector needed
• Cons: limited to instrumented apps with X-Ray SDK
• Best for: microservices tracing on ECS/EKS/Lambda
DASHBOARD LAYOUT (3-tier pattern)
Tier 1 (Row 1): Status overview — stat panels (KPIs, health checks)
Tier 2 (Row 2): Time-series trends — CPU, latency, throughput
Tier 3 (Row 3): Detail tables — top-N instances, error logs, traces
── Use row collapses to keep the dashboard scannable
── Use templating variables ($region, $service, $datasource)
── Set refresh: 30s for operational, 5m for executive overview
Output format
WORKSPACE: <workspace-name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
CHECKLIST:
[✓|✗] Workspace: <name>, version: <10.4 | 11.0> (Standard | Enterprise)
[✓|✗] Authentication: AWS_SSO (IAM Identity Center) | SAML
[✓|✗] Permission type: SERVICE_MANAGED | CUSTOMER_MANAGED
[✓|✗] IAM role: <role-name> (CloudWatch + AMP + X-Ray read access)
[✓|✗] Data source: CloudWatch (regions: <list>)
[✓|✗] Data source: AMP/Prometheus (workspace: <amp-id>, status: ACTIVE)
[✓|✗] Data source: Timestream (database: <name>)
[✓|✗] Data source: OpenSearch (domain: <name>)
[✓|✗] Data source: X-Ray
[✓|✗] Dashboard: <title> (<N> panels, templating: <list>)
[✓|✗] Alert rules: <N> rules (evaluation interval: <N>s, for: <N>m)
[✓|✗] Notification policies: <N> routes (by: severity, team)
[✓|✗] Contact points: <list> (SNS, Slack, email)
[✓|✗] VPC config: <subnet-ids, sg-ids> | Public
[✓|✗] Tags: <list>
VERIFICATION_COMMANDS:
aws grafana describe-workspace --workspace-id <id>
aws grafana list-workspaces
aws amps describe-workspace --workspace-id <amp-id>
aws iam get-role --role-name GrafanaDataSourceRole
Worked example — production observability with CloudWatch + AMP + X-Ray
WORKSPACE: prod-observability
VERDICT: READY_TO_DEPLOY
CHECKLIST:
[✓] Workspace: prod-observability, version: 10.4 (Standard)
[✓] Authentication: AWS_SSO (IAM Identity Center)
[✓] Permission type: CUSTOMER_MANAGED
[✓] IAM role: GrafanaDataSourceRole (cloudwatch:GetMetricData, aps:QueryMetrics, xray:GetTraceSummaries)
[✓] Data source: CloudWatch (regions: us-east-1, us-west-2)
[✓] Data source: AMP/Prometheus (workspace: ws-abc123, status: ACTIVE)
[✓] Data source: X-Ray
[✓] Dashboard: Production Overview (12 panels, templating: $datasource, $region)
[✓] Alert rules: 5 rules (evaluation: 60s, for: 5m)
[✓] Notification policies: 2 routes (severity=critical -> sns-critical, team=platform -> sns-platform)
[✓] Contact points: SNS (arn:aws:sns:us-east-1:123456789012:grafana-alerts)
[✓] Tags: Environment=production, Workload=observability
VERIFICATION_COMMANDS:
aws grafana describe-workspace --workspace-id g-abc123
aws amps describe-workspace --workspace-id ws-abc123
aws iam get-role --role-name GrafanaDataSourceRole
STRICT output contract
Required output structure
Every response MUST begin with this block — no preamble, no
conversational opening:
WORKSPACE: <workspace-name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
CHECKLIST:
[✓|✗] <check description>
VERIFICATION_COMMANDS:
<aws grafana / amps / iam commands>
FORBIDDEN output patterns
- NEVER start with conversational preamble. The WORKSPACE/VERDICT block
is the FIRST line, always. Use uppercase verdict values only
(
READY_TO_DEPLOY, PREREQUISITES_MISSING).
- NEVER omit the CHECKLIST — every dimension (workspace, auth, permission
type, IAM role, data sources, dashboard, alerting layers, tags) must
appear with a pass/fail marker.
- NEVER recommend
SERVICE_MANAGED permission type for compliance
workloads without flagging it as a WARN finding (broad read access).
- NEVER list a CLI command with placeholder flags in a READY_TO_DEPLOY
plan — every flag must be populated with actual values from the input.
- NEVER recommend a dashboard with hardcoded data source UIDs without
flagging the portability risk across workspaces.
Recent AWS features (2024-2026)
2024-2026 feature notes (Grafana 11.x, Enterprise on AWS, AMP cross-account, IoT SiteWise, API-key automation, SNS alerting, VPC config) moved verbatim to references/advanced-patterns.md.
Load on demand when a request references recent features or versions.
References (load on demand)
- references/data-sources-and-dashboard-json.md — per-data-source configuration, dashboard JSON model, AMP integration, panel and alerting detail
- references/provisioning-cli-commands.md — prerequisite checks, IAM role JSON, workspace/API-key/dashboard CLI walkthroughs, and common boilerplate
- references/advanced-patterns.md — Enterprise tier (Incident/OnCall) and 2024-2026 feature notes
Domain
AWS CloudOps / Amazon Managed Grafana Workspace Provisioning, Data Source
Integration, Dashboard Design, and Alerting.
AWS documentation
1---2name: grafana-dashboard-deployer3description: 'Provisions Amazon Managed Grafana workspaces and dashboards with production defaults: workspace creation (authentication via SSO or IAM Identity Center), data sources (CloudWatch, Prometheus/AMP, Timestream, OpenSearch, X-Ray), dashboard JSON model (panels, templating variables, time range), alerting (alert rules, notification policies, contact points), IAM role for data source access, AMP workspace integration, and latest features (Grafana Enterprise, Incident, OnCall). Emits a READY_TO_DEPLOY checklist with verification commands. Use when creating a Grafana workspace, adding data sources, building dashboards, configuring alerting, or integrating AMP. Triggers: create Grafana workspace, Grafana dashboard, Grafana data source, Grafana alerting, AMP integration, Grafana Enterprise, Grafana Incident.'4license: Apache-2.05compatibility: 'Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with grafana, amps, iam, ec2, cloudwatch, timestream, opensearch, and xray access. Works with Terraform aws_grafana_workspace / aws_grafana_workspace_api_key / aws_prometheus_workspace resources and CloudFormation AWS::Grafana::Workspace templates.'6metadata:7 source: https://skillmd.com/skills/jhkchan/grafana-dashboard-deployer8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '1'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Management15 task_type: deploy16 skill_class: capability17 lifecycle_status: active18 verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING19 when_to_use: Invoke when the user wants to create an Amazon Managed Grafana workspace, configure data sources (CloudWatch, AMP, Timestream, OpenSearch, X-Ray), build dashboard JSON models with panels and templating variables, set up alerting rules and notification policies, integrate AMP workspaces, or adopt Grafana Enterprise features (Incident, OnCall). Do NOT invoke for self-managed Grafana on EC2/EKS, Prometheus configuration, or CloudWatch dashboard creation (use deploy-cloudwatch-dashboard).20 activation_triggers: create grafana workspace, deploy grafana dashboard, grafana data source, grafana cloudwatch, grafana prometheus, grafana amp, grafana timestream, grafana opensearch, grafana x-ray, grafana alerting, grafana notification policy, grafana contact point, grafana enterprise, grafana incident, grafana oncall, grafana iam role21 version: 0.1.022 author: Jacky Chan — AWS Community Builder23 keywords: aws, grafana, dashboard, managed grafana, deploy, cloudops, observability, data source, cloudwatch, prometheus, amp, timestream, opensearch, x-ray, alerting, notification, iam identity center, sso, grafana enterprise, grafana incident, grafana oncall24 tags: aws, grafana, observability, deploy, management, dashboard, cloudwatch, prometheus, alerting, amp25 dependencies: aws-orchestrator26---2728# Grafana Dashboard Deployer2930## What this skill does3132Provisions Amazon Managed Grafana workspaces and dashboards with33production-grade defaults across five core domains: workspace creation34with authentication (SSO/IAM Identity Center), data source integration35(CloudWatch, AMP/Prometheus, Timestream, OpenSearch, X-Ray), dashboard36JSON model design (panels, templating, time range), alerting (rules,37notification policies, contact points), and IAM role configuration for38data source access. Emits a READY_TO_DEPLOY checklist with39copy-pasteable verification commands.4041## Activation keywords4243create Grafana workspace, Grafana dashboard, Grafana data source,44CloudWatch data source, Prometheus data source, AMP workspace, Timestream45data source, OpenSearch data source, X-Ray data source, Grafana alerting,46alert rules, notification policy, contact point, IAM Identity Center,47SSO authentication, Grafana Enterprise, Grafana Incident, Grafana OnCall,48IAM role for Grafana, workspace API key, service managed IAM role.4950## Invocation contract (hard requirement)5152When this skill is invoked with a Grafana-provisioning request (workspace53name, authentication mode, data sources, dashboard requirements, or a54partial configuration), the agent MUST respond with the READY_TO_DEPLOY55checklist defined in the section "Output format" using the literal56all-caps labels `WORKSPACE:`, `VERDICT:`, `CHECKLIST:`, and57`VERIFICATION_COMMANDS:`. Do NOT preface the checklist with prose,58headings, or disclaimers — emit the block as the first lines of the59response. This contract is what assertion-based evals and downstream60provisioning pipelines rely on; deviating from the literal labels breaks61automation silently.6263## Mindset6465**One-line takeaway:** an Amazon Managed Grafana workspace is not just66"Grafana on AWS" — it is a **managed integration boundary** where the67authentication mode (IAM Identity Center vs SAML), the data source IAM68role (service-managed vs customer-managed), and the Grafana version69(Standard vs Enterprise) are decided at workspace creation and cannot70all be changed in place.7172Three misconceptions dominate Grafana workspace misdesign at provisioning73time:7475- **"I can switch authentication modes after creation."** The76 authentication mode is set at workspace creation via77 `authenticationProviders`. Switching from SAML to IAM Identity Center78 (or vice versa) requires recreating the workspace. Plan the79 authentication strategy before calling `create-workspace`.8081- **"Data sources just need a URL — IAM handles the rest."** Managed82 Grafana data sources require either a **service-managed IAM role**83 (Grafana creates and manages it) or a **customer-managed IAM role**84 with specific read permissions for each data source service85 (CloudWatch, AMP, Timestream, etc.). Without the correct IAM role86 permissions, data sources return permission errors on every query.8788- **"Alerting is just Grafana's built-in alert manager."** Managed89 Grafana alerting has three layers that must all be configured: alert90 rules (the condition), notification policies (the routing), and91 contact points (the destination). Missing any layer means alerts fire92 but go nowhere, or contact points exist but nothing routes to them.9394## Quick navigation9596| Section | What it covers | When to read it |97|---|---|---|98| **Quick reference** | Deployment checklist + workspace decision gate | Before any deployment |99| **§ Mindset** | Authentication immutability, IAM role gap, alerting layers | Understanding the model |100| **§ Prerequisites** | IAM Identity Center, AMP workspace, VPC, data source roles | Before producing the plan |101| **§ Workspace selection** | Standard vs Enterprise decision matrix | Choosing the right tier |102| **§ Provisioning procedure** | 10-step deploy: workspace, auth, data sources, dashboard, alerting, IAM, AMP, Enterprise | When building the deploy plan |103| **§ Common patterns** | Boilerplate for workspace, CloudWatch, AMP, dashboard JSON, alerting | Boilerplate lookup |104| **§ Output format** | Structured output template with VERDICT, CHECKLIST, VERIFICATION_COMMANDS | Formatting the response |105| **§ STRICT output contract** | Required structure + FORBIDDEN patterns | Validating the output |106| **§ NEVER** | Top 5 anti-patterns | Review before risky operations |107| **§ Expert heuristic** | Data source selection + dashboard panel layout strategy | Design decisions |108109## Quick reference — deployment checklist110111| Dimension | Requirement | Step |112|---|---|---|113| Workspace name | Globally unique | Step 1 |114| Authentication | IAM Identity Center (recommended) or SAML | Step 1 |115| Grafana version | Standard or Enterprise | Step 1 |116| IAM role | Service-managed (auto) or customer-managed (custom) | Step 2 |117| Data source: CloudWatch | IAM role with cloudwatch:GetMetricData, logs:DescribeLogGroups | Step 3 |118| Data source: AMP | AMP workspace ARN + IAM role with aps:QueryMetrics | Step 3 |119| Data source: Timestream | IAM role with timestream:Select | Step 3 |120| Data source: OpenSearch | OpenSearch endpoint + IAM role with es:ESHttpGet | Step 3 |121| Data source: X-Ray | IAM role with xray:GetTraceSummaries | Step 3 |122| Dashboard JSON | Panels, templating variables, time range, datasource ref | Step 4 |123| Alert rules | Condition, evaluation interval, for duration | Step 5 |124| Notification policies | Routing by labels/severity | Step 5 |125| Contact points | SNS, Slack, email, PagerDuty, webhook | Step 5 |126| AMP workspace | Exists and is ACTIVE (if using Prometheus data source) | Step 6 |127| Enterprise features | Incident, OnCall, reporting, SAML team sync | Step 7 |128129## Prerequisites (verify before provisioning)130131Before emitting provisioning commands, verify these prerequisites. If any132are missing, the verdict is **PREREQUISITES_MISSING** with a specific gap133citation.134135| Prerequisite | Why it matters | How to verify |136|---|---|---|137| AWS account with Grafana access | Cannot provision without it | `aws sts get-caller-identity` |138| Region selected | Managed Grafana is region-scoped | `aws configure get region` |139| IAM Identity Center enabled (for SSO) | Recommended auth mode; avoids separate SAML setup | `aws sso-admin list-instances` |140| AMP workspace ACTIVE (if Prometheus data source) | Grafana queries the AMP workspace via remote read | `aws amps list-workspaces` |141| OpenSearch domain ACTIVE (if OpenSearch data source) | Grafana queries via the domain endpoint | `aws opensearch list-domain-names` |142| KMS key (for workspace encryption) | Grafana workspace data encryption | `aws kms describe-key --key-id <key-id>` |143| VPC + subnets (for VPC-attached data sources) | Private networking to internal data sources | `aws ec2 describe-subnets` |144| SNS topic (for alert contact points) | Grafana alert notifications via SNS | `aws sns list-topics` |145146If any prerequisite is missing, output `VERDICT: PREREQUISITES_MISSING`147and cite the specific gap.148149## Workspace tier selection (Standard vs Enterprise)150151| Tier | Key features | Cost | Use when |152|---|---|---|---|153| **Standard** | Core Grafana, 5 data source types, basic alerting, IAM Identity Center auth | Lower | Most observability workloads, team-level dashboards |154| **Enterprise** | All Standard + Enterprise plugins, SAML, team sync from IdP, reporting, Incident, OnCall, audit logs | Higher | Enterprise SSO, on-call management, compliance reporting, incident response |155156**Immutability note:** the Grafana version (Standard vs Enterprise) is157set at workspace creation via the `grafanaVersion` or license type.158Upgrading from Standard to Enterprise is supported via AWS support159ticket; plan the tier before creating the workspace.160161## 10-step provisioning procedure162163### Step 1 — Workspace creation + authentication164165The workspace is the top-level resource. Authentication mode is decided166here and is difficult to change post-creation.167168```bash169aws grafana create-workspace \170 --workspace-name <workspace-name> \171 --account-access-type CURRENT_ACCOUNT \172 --authentication-providers AWS_SSO \173 --permission-type SERVICE_MANAGED \174 --data-sources CLOUDWATCH PROMETHEUS XRAY \175 --grafana-version 10.4 \176 --description "Production observability workspace"177```178179**Authentication providers:**180- `AWS_SSO` — IAM Identity Center (recommended). Integrates with181 corporate IdP via SAML or external IdP providers.182- `SAML` — direct SAML 2.0 integration (requires SAML metadata URL/JSON).183184**Permission types:**185- `SERVICE_MANAGED` — Grafana manages IAM roles for data sources186 automatically. Simpler but less control over permissions.187- `CUSTOMER_MANAGED` — you provide a customer-managed IAM role with188 explicit permissions per data source. Required for fine-grained189 access control and compliance.190191**Common mistake:** choosing `SERVICE_MANAGED` for a compliance workload.192Service-managed roles grant broad read across all data sources of the193configured types. For compliance (least-privilege), use `CUSTOMER_MANAGED`.194195### Step 2 — IAM role for data source access196197**Service-managed (auto-created):** Grafana creates an IAM role with198permissions scoped to the configured data source types. No manual IAM199configuration needed.200201Customer-managed role trust/inline policy JSON and the workspace role-association commands moved verbatim to [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) (Step 2 section).202Load on demand when emitting the IAM role portion of a CUSTOMER_MANAGED deployment plan.203204### Step 3 — Data source configuration205206Managed Grafana supports five native AWS data source types. Each requires207specific configuration in the Grafana workspace.208209**CloudWatch** (enabled via `--data-sources CLOUDWATCH`):210- Regions: specify which AWS regions to query211- Namespaces: CloudWatch metric namespaces (e.g., AWS/EC2, AWS/Lambda)212- Log groups: optional, for CloudWatch Logs queries213214**Prometheus / AMP** (enabled via `--data-sources PROMETHEUS`):215- AMP workspace ARN: the Prometheus workspace to query216- Requires IAM role with `aps:QueryMetrics` on the AMP workspace217218```bash219# Create AMP workspace (if not existing)220aws amps create-workspace \221 --workspace-name <amp-name> \222 --alias <amp-alias>223224# Get AMP workspace ID for Grafana data source config225aws amps describe-workspace --workspace-id <amp-id>226```227228**Timestream** (enabled via `--data-sources TIMESTREAM`):229- Database/table selection via Grafana query editor230- Requires IAM role with `timestream:Select` and `timestream:DescribeEndpoints`231232**OpenSearch** (enabled via `--data-sources OPENSEARCH`):233- OpenSearch domain endpoint URL234- Requires IAM role with `es:ESHttpGet` on the domain235236**X-Ray** (enabled via `--data-sources XRAY`):237- Service map and trace visualization238- Requires IAM role with `xray:GetTraceSummaries` and `xray:GetTraceGraph`239240**Common mistake:** adding a data source type in Grafana without the241matching IAM permission. The data source appears configured but returns242permission errors on every query. Verify IAM role includes the243specific read actions for each data source.244245### Step 4 — Dashboard JSON model (panels, templating, time range)246247Grafana dashboards are JSON documents. The dashboard JSON model defines248panels, templating variables, time range, annotations, and refresh rate.249250Dashboard JSON structure, templating-variable guidance, panel-type table, and API import commands moved verbatim to [references/data-sources-and-dashboard-json.md](references/data-sources-and-dashboard-json.md) (Step 4 section).251Load on demand when authoring or importing dashboard JSON.252253### Step 5 — Alerting (rules, notification policies, contact points)254255Grafana alerting has three layers that must all be configured:256257**Alert rules** — the condition that triggers an alert. Defines the258metric query, threshold, evaluation interval, and `for` duration:259260```json261{262 "uid": "cpu-high", "title": "CPU Utilization High",263 "condition": "B",264 "data": [265 {"refId":"A","datasourceUid":"cloudwatch-uid","model":{"namespace":"AWS/EC2","metricName":"CPUUtilization","statistics":["Average"]}},266 {"refId":"B","model":{"expression":"$A > 85","type":"threshold"}}267 ],268 "for": "5m",269 "labels": {"severity":"warning","team":"platform"}270}271```272273**Notification policies** — route alert instances to contact points by274label matchers (severity, team, etc.):275276```json277{278 "routes": [279 {"receiver":"sns-platform","object_matchers":[["team","=","platform"]]},280 {"receiver":"sns-critical","object_matchers":[["severity","=","critical"]]}281 ]282}283```284285**Contact points** — the notification destination (SNS, Slack, email,286PagerDuty, webhook):287288```json289{"name":"sns-platform","type":"sns","settings":{"topic":"arn:aws:sns:us-east-1:123456789012:grafana-alerts","authProvider":"aws_iam","region":"us-east-1"}}290```291292**Common mistake:** creating alert rules without notification policies or293contact points. The rule fires but no notification is sent — the alert294shows as "firing" in the Grafana UI but nothing reaches the on-call team.295Configure all three layers.296297### Step 6 — AMP workspace integration298299AMP workspace creation, remote-write source list, and ACTIVE-status verification moved verbatim to [references/data-sources-and-dashboard-json.md](references/data-sources-and-dashboard-json.md) (Step 6 section).300Load on demand when wiring the Prometheus data source to AMP.301302### Step 7 — Grafana Enterprise features (Incident, OnCall)303304Enterprise workspace creation command, Incident/OnCall capability notes, and SAML team sync moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).305Load on demand when the workspace tier is Enterprise.306307## Common patterns (boilerplate)308309Boilerplate snippets (production workspace, customer-managed IAM role, AMP + dashboard import) moved verbatim to [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md).310Load on demand when emitting copy-paste deployment commands.311312## NEVER do these things (top 5)3133141. **NEVER create a Managed Grafana workspace without deciding the315 authentication mode first.** Switching from SAML to IAM Identity316 Center (or vice versa) requires recreating the workspace. Plan auth317 before `create-workspace`. IAM Identity Center (`AWS_SSO`) is the318 recommended default.3193202. **NEVER use `SERVICE_MANAGED` permission type for compliance321 workloads.** Service-managed roles grant broad read across all data322 sources of the configured types. For least-privilege and compliance323 (PCI-DSS, HIPAA, SOC2), use `CUSTOMER_MANAGED` with an explicit IAM324 role policy scoped to specific resources.3253263. **NEVER configure alert rules without notification policies and327 contact points.** A rule without a notification policy fires but328 goes nowhere. A notification policy without a contact point routes329 to nothing. Configure all three layers: rule -> policy -> contact.3303314. **NEVER query an AMP workspace before verifying it is ACTIVE and332 receiving metrics.** The AMP workspace must be `ACTIVE` and the333 remote write source must be sending data. Querying an empty AMP334 workspace returns no results — not an error — leading to false335 confidence that the integration is working.3363375. **NEVER hardcode dashboard data sources.** Use templating variables338 (`$datasource`) so dashboards work across environments and regions.339 Hardcoded data source UIDs break when importing dashboards across340 workspaces or environments.341342## Expert heuristic: data source selection and dashboard layout343344```345DATA SOURCE SELECTION346 ├─ CloudWatch metrics (AWS native)347 │ └─ Namespace: AWS/EC2, AWS/Lambda, AWS/RDS, AWS/ApplicationELB348 │ • Pros: zero setup, all AWS services349 │ • Cons: 1-minute resolution (high-res is 10s with detailed monitoring)350 │ • Best for: AWS infrastructure monitoring351 │352 ├─ AMP/Prometheus (custom + application metrics)353 │ └─ Remote write from app, CloudWatch agent, OTel collector354 │ • Pros: high-resolution (15s or better), PromQL, custom labels355 │ • Cons: requires remote write pipeline setup356 │ • Best for: application metrics, Kubernetes, custom exporters357 │358 ├─ Timestream (high-volume time-series)359 │ └─ IoT, DevOps, application events360 │ • Pros: petabyte-scale, SQL queries, cost-effective at high volume361 │ • Cons: SQL (not PromQL), different query model362 │ • Best for: IoT telemetry, high-cardinality event data363 │364 ├─ OpenSearch (log analytics)365 │ └─ Log queries, full-text search, aggregation366 │ • Pros: Lucene/PPL queries, aggregation pipelines367 │ • Cons: separate from CloudWatch Logs368 │ • Best for: centralized log analytics with OpenSearch369 │370 └─ X-Ray (distributed tracing)371 └─ Service maps, trace waterfalls, latency breakdown372 • Pros: AWS-native tracing, no separate collector needed373 • Cons: limited to instrumented apps with X-Ray SDK374 • Best for: microservices tracing on ECS/EKS/Lambda375376DASHBOARD LAYOUT (3-tier pattern)377 Tier 1 (Row 1): Status overview — stat panels (KPIs, health checks)378 Tier 2 (Row 2): Time-series trends — CPU, latency, throughput379 Tier 3 (Row 3): Detail tables — top-N instances, error logs, traces380 ── Use row collapses to keep the dashboard scannable381 ── Use templating variables ($region, $service, $datasource)382 ── Set refresh: 30s for operational, 5m for executive overview383```384385## Output format386387```text388WORKSPACE: <workspace-name>389VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING390CHECKLIST:391 [✓|✗] Workspace: <name>, version: <10.4 | 11.0> (Standard | Enterprise)392 [✓|✗] Authentication: AWS_SSO (IAM Identity Center) | SAML393 [✓|✗] Permission type: SERVICE_MANAGED | CUSTOMER_MANAGED394 [✓|✗] IAM role: <role-name> (CloudWatch + AMP + X-Ray read access)395 [✓|✗] Data source: CloudWatch (regions: <list>)396 [✓|✗] Data source: AMP/Prometheus (workspace: <amp-id>, status: ACTIVE)397 [✓|✗] Data source: Timestream (database: <name>)398 [✓|✗] Data source: OpenSearch (domain: <name>)399 [✓|✗] Data source: X-Ray400 [✓|✗] Dashboard: <title> (<N> panels, templating: <list>)401 [✓|✗] Alert rules: <N> rules (evaluation interval: <N>s, for: <N>m)402 [✓|✗] Notification policies: <N> routes (by: severity, team)403 [✓|✗] Contact points: <list> (SNS, Slack, email)404 [✓|✗] VPC config: <subnet-ids, sg-ids> | Public405 [✓|✗] Tags: <list>406VERIFICATION_COMMANDS:407 aws grafana describe-workspace --workspace-id <id>408 aws grafana list-workspaces409 aws amps describe-workspace --workspace-id <amp-id>410 aws iam get-role --role-name GrafanaDataSourceRole411```412413### Worked example — production observability with CloudWatch + AMP + X-Ray414415```text416WORKSPACE: prod-observability417VERDICT: READY_TO_DEPLOY418CHECKLIST:419 [✓] Workspace: prod-observability, version: 10.4 (Standard)420 [✓] Authentication: AWS_SSO (IAM Identity Center)421 [✓] Permission type: CUSTOMER_MANAGED422 [✓] IAM role: GrafanaDataSourceRole (cloudwatch:GetMetricData, aps:QueryMetrics, xray:GetTraceSummaries)423 [✓] Data source: CloudWatch (regions: us-east-1, us-west-2)424 [✓] Data source: AMP/Prometheus (workspace: ws-abc123, status: ACTIVE)425 [✓] Data source: X-Ray426 [✓] Dashboard: Production Overview (12 panels, templating: $datasource, $region)427 [✓] Alert rules: 5 rules (evaluation: 60s, for: 5m)428 [✓] Notification policies: 2 routes (severity=critical -> sns-critical, team=platform -> sns-platform)429 [✓] Contact points: SNS (arn:aws:sns:us-east-1:123456789012:grafana-alerts)430 [✓] Tags: Environment=production, Workload=observability431VERIFICATION_COMMANDS:432 aws grafana describe-workspace --workspace-id g-abc123433 aws amps describe-workspace --workspace-id ws-abc123434 aws iam get-role --role-name GrafanaDataSourceRole435```436437## STRICT output contract438439### Required output structure440441Every response MUST begin with this block — no preamble, no442conversational opening:443444```text445WORKSPACE: <workspace-name>446VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING447CHECKLIST:448 [✓|✗] <check description>449VERIFICATION_COMMANDS:450 <aws grafana / amps / iam commands>451```452453### FORBIDDEN output patterns454455- NEVER start with conversational preamble. The WORKSPACE/VERDICT block456 is the FIRST line, always. Use uppercase verdict values only457 (`READY_TO_DEPLOY`, `PREREQUISITES_MISSING`).458- NEVER omit the CHECKLIST — every dimension (workspace, auth, permission459 type, IAM role, data sources, dashboard, alerting layers, tags) must460 appear with a pass/fail marker.461- NEVER recommend `SERVICE_MANAGED` permission type for compliance462 workloads without flagging it as a WARN finding (broad read access).463- NEVER list a CLI command with placeholder flags in a READY_TO_DEPLOY464 plan — every flag must be populated with actual values from the input.465- NEVER recommend a dashboard with hardcoded data source UIDs without466 flagging the portability risk across workspaces.467468## Recent AWS features (2024-2026)4694702024-2026 feature notes (Grafana 11.x, Enterprise on AWS, AMP cross-account, IoT SiteWise, API-key automation, SNS alerting, VPC config) moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).471Load on demand when a request references recent features or versions.472473## References (load on demand)474475- [references/data-sources-and-dashboard-json.md](references/data-sources-and-dashboard-json.md) — per-data-source configuration, dashboard JSON model, AMP integration, panel and alerting detail476- [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) — prerequisite checks, IAM role JSON, workspace/API-key/dashboard CLI walkthroughs, and common boilerplate477- [references/advanced-patterns.md](references/advanced-patterns.md) — Enterprise tier (Incident/OnCall) and 2024-2026 feature notes478479## Domain480481AWS CloudOps / Amazon Managed Grafana Workspace Provisioning, Data Source482Integration, Dashboard Design, and Alerting.483484## AWS documentation485486- **Amazon Managed Grafana User Guide** — https://docs.aws.amazon.com/grafana/latest/userguide/what-is-amazon-managed-grafana.html487- **Create a Workspace** — https://docs.aws.amazon.com/grafana/latest/userguide/AMG-manage-workspace.html488- **Data Sources** — https://docs.aws.amazon.com/grafana/latest/userguide/AMG-data-sources.html489- **CloudWatch Data Source** — https://docs.aws.amazon.com/grafana/latest/userguide/CloudWatch-template.html490- **AMP Integration** — https://docs.aws.amazon.com/grafana/latest/userguide/AMP-configure-data-source.html491- **Grafana Alerting** — https://docs.aws.amazon.com/grafana/latest/userguide/alerts.html492- **IAM Identity Center** — https://docs.aws.amazon.com/grafana/latest/userguide/AMG-with-IAM-Identity-Center.html493- **Grafana Enterprise** — https://docs.aws.amazon.com/grafana/latest/userguide/enterprise.html494- **Grafana API Reference** — https://docs.aws.amazon.com/grafana/latest/APIReference/495- **Amazon Managed Service for Prometheus** — https://docs.aws.amazon.com/prometheus/latest/userguide/what-is-Amazon-Managed-Service-Prometheus.html