> For the complete documentation index, see [llms.txt](https://docs.saml.to/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saml.to/advanced-usage/aws/cloudwatch-dashboard-sharing.md).

# CloudWatch Dashboard Sharing

## Initial Setup

1. [Set up SSO for CloudWatch dashboard sharing](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-dashboard-sharing.html#share-cloudwatch-dashboards-setup-SSO)
   1. When setting **Identity Providers** on the **Cognito User Pool**, choose **SAML**
   2. When prompted for a **Metadata document**
      1. Upload the [IdP Metadata from SAML.to](https://saml.to/metadata) for your User or Organization
   3. When prompted for the **Provider name**
      1. Input `saml-to`
2. In [Dashboard Sharing](https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-1#settings:/dashboardSharing), select `saml-to` as the Identity Provider
3. Go to the desired Dashboard in CloudWatch
   1. Click **Actions** then **Share Dashboard**&#x20;
   2. Under **Share all your account’s CloudWatch dashboards using single sign-on (SSO)**
      1. Under **Resources**
         1. <mark style="color:green;">Make note of the</mark> <mark style="color:green;"></mark><mark style="color:green;">**Sharable Link**</mark> (e.g. `https://cloudwatch.amazonaws.com/dashboard.html?...`)
         2. Navigate to the **Cognito UserPoolIdentityProvider**&#x20;
            1. <mark style="color:green;">Make note of the</mark> <mark style="color:green;"></mark><mark style="color:green;">**User Pool ID**</mark> (e.g. `us-east-1_Q046sC47y`)
            2. <mark style="color:green;">Under Make note of the</mark> <mark style="color:green;"></mark><mark style="color:green;">**Cognito Domain**</mark> (e.g. `https://cw-db-580360238192.auth.us-east-1.amazoncognito.com`)
4. Edit `saml-to.yml` in your configured repository and make the following changes:

```
providers:
  ...
  my-dashboard:
    loginUrl: 'YOUR_DASHBOARD_SHAREABLE_LINK'
    entityId: 'urn:amazon:cognito:sp:YOUR_USER_POOL_ID'
    acsUrl: 'YOUR_COGNITO_DOMAIN/saml2/idpresponse'
    nameIdFormat: email
  ...
permissions:
  ...
  my-dashboard:
    users:
      github:
        - YOUR_GITHUB_USER_ID
        - ANOTHER_GITHUB_USER_ID
```

* Replace `YOUR_DASHBOARD_SHAREABLE_LINK` with the **Shareable Link** above
* Replace `YOUR_USER_POOL_ID` with the **User Pool ID** above
* Replace `YOUR_COGNITO_DOMAIN` with the **Cognito Domain** above
* Replace `YOUR_GITHUB_USER_ID` with your GitHub Login
  * Add other GitHub users as-needed!

## Opening the Dashboard

After installing the [SAML.to CLI](https://github.com/saml-to/cli), run the following command:

```
saml-to login my-dashboard
```

Which will open a browser window to the dashboard!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.saml.to/advanced-usage/aws/cloudwatch-dashboard-sharing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
