Lab complete!
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool
If you used the automation scripts in the previous step you should already have the CUDOS Dashboard and can skip to the bottom of this page and click Next Step
There are 3 options to deploy the CUDOS Dashboard. If you are unsure what option to select, we recommend using the Manual deployment
This option is the manual deployment and will walk you through all steps required to create this dashboard without any automation. We recommend this option users new to Athena and QuickSight.
NOTE: If you’ve deployed the Cost Intelligence Dashboard, you will only need to create the customer_all view, views 0-5 are the same as the Cost Intelligence Dashboard |
---|
The data source for the dashboard will be an Athena view of your existing Cost and Usage Report (CUR). The default dashboard assumes you have both Savings Plans and Reserved Instances, if not you will need to create the alternate views.
Login via SSO in your Cost Optimization account, go into the Athena console:
Modify and run the following queries to confirm if you have Savings Plans, and Reserved Instances in your usage. If no lines are returned, you have no Savings Plans or Reserved Instances. Replace (database).(tablename) and run the following:
Savings Plans:
select * from (database).(tablename)
where savings_plan_savings_plan_a_r_n not like ''
limit 10
Reserved Instances:
select * from (database).(tablename)
where reservation_reservation_a_r_n not like ''
limit 10
NOTE: Unless you already have Savings Plans and Reserved Instances both already adopted as your savings options, recreate Athena Views corresponding with your savings profile whenever you onboard a new savings option (like Savings Plans or Reserved Instances) for the first time. |
---|
Create the account_map view by modifying the following code, and executing it in Athena:
Create the Summary view by modifying the following code, and executing it in Athena:
Create the EC2_Running_Cost view by modifying the following code, and executing it in Athena:
Create the Compute savings plan eligible spend view by modifying the following code, and executing it in Athena:
Create the s3 view by modifying the following code, and executing it in Athena:
Create the RI SP Mapping view by modifying the following code, and executing it in Athena:
Create the customer_all view by modifying the following code, and executing it in Athena:
NOTE: The Athena Views are updated to reflect any additions in the cost and usage report. If you created your dashboard prior to June 1, 2021 you will want to update to the latest views. |
---|
Go to the QuickSight service homepage inside your account. Be sure to select the correct region from the top right user menu or you will not see your expected tables
From the left hand menu, choose Datasets
Click New dataset displayed in the top right corner
Choose Athena as your Data Source
Enter a data source name of Cost_Dashboard and click Create data source
Select the database which holds the views you created (reference Athena if you’re unsure which one to select), and the summary_view table, then click Edit/Preview data
Select SPICE to change your Query mode
Click Add Data
Select Data source
Choose your Cost_Dashboard view and click Select
Select the database which holds the CUR views you created
Choose your account_map view and click Select
Click the two circles to open the Join configuration, then select Left to change your join type
Configure the join clause to linked_account_id = account_id, then click Apply
Select Save
Select the summary_view dataset
Click Schedule refresh
Click Create
Enter a daily schedule, in the appropriate time zone and click Create
Click Cancel to exit
Click x to exit
Repeat steps 3-21, creating data sets with the remaining Athena views. You will reuse your existing Cost_Dashboard data source, and select the following views as the table:
s3_view
ec2_running_cost
compute_savings_plan_eligible_spend
NOTE: Make sure to reuse the existing Athena data source by scrolling to the bottom of the Data source create/select page when creating a new Dataset instead of creating a new data source | |
---|---|
![]() |
When this step is complete, your Datasets tab should have 4 new SPICE Datasets
Select the summary_view dataset
Click Edit Data Set
Click Add Data
Select Data source
Choose your Cost_Dashboard view and click Select
Select the database which holds the CUR views you created
Choose your ri_sp_mapping view and click Select
Click the two circles to open the Join configuration, then select Left to change your join type
Click Add a new join clause twice so you have 3 join clauses to configure in total. Configure the 3 join clauses as below, then click Apply
Click Save
Click New dataset displayed in the top right corner of QuickSight
Select your existing Cost_Dashboard as your Data Source
Keep the Query mode as Direct query
Repeat steps 8-15, but configure this join clause in step 14: line_item_usage_account_id = account_id
NOTE: This completes the QuickSight Data Preparation section. Next up is the Import process to generate the QuickSight Dashboard. |
---|
We will now use the CLI to create the dashboard from the CUDOS Dashboard template.
list-users
and make a note of your User ARN:aws quicksight list-users --aws-account-id <Account_ID> --namespace default --region <Region>
list-data-sets
and make a note of the Name and Arn for the 5 Datasets ARNs:aws quicksight list-data-sets --aws-account-id <Account_ID> --region <Region>
{
"AwsAccountId": "<Account_ID>",
"DashboardId": "cudos",
"Name": "CUDOS",
"Permissions": [
{
"Principal": "<User ARN>",
"Actions": [
"quicksight:DescribeDashboard",
"quicksight:ListDashboardVersions",
"quicksight:UpdateDashboardPermissions",
"quicksight:QueryDashboard",
"quicksight:UpdateDashboard",
"quicksight:DeleteDashboard",
"quicksight:DescribeDashboardPermissions",
"quicksight:UpdateDashboardPublishedVersion"
]
}
],
"DashboardPublishOptions": {
"AdHocFilteringOption": {
"AvailabilityStatus": "DISABLED"
}
},
"SourceEntity": {
"SourceTemplate": {
"DataSetReferences": [
{
"DataSetPlaceholder": "summary_view",
"DataSetArn": "arn:aws:quicksight:<Region>:<Account_ID>:dataset/<DatasetID>"
},
{
"DataSetPlaceholder": "ec2_running_cost",
"DataSetArn": "arn:aws:quicksight:<Region>:<Account_ID>:dataset/<DatasetID>"
},
{
"DataSetPlaceholder": "compute_savings_plan_eligible_spend",
"DataSetArn": "arn:aws:quicksight:<Region>:<Account_ID>:dataset/<DatasetID>"
},
{
"DataSetPlaceholder": "s3_view",
"DataSetArn": "arn:aws:quicksight:<Region>:<Account_ID>:dataset/<DatasetID>"
},
{
"DataSetPlaceholder": "customer_all",
"DataSetArn": "arn:aws:quicksight:<Region>:<Account_ID>:dataset/<DatasetID>"
}
],
"Arn": "arn:aws:quicksight:us-east-1:223485597511:template/cudos_dashboard_v3"
}
},
"VersionDescription": "1"
}
Update the import.json to match your details by replacing the following placeholders:
Placeholder | Replace with |
---|---|
<Account_ID> | AWS Account ID where the dashboard will be deployed |
<Region> | Region Code where the dashboard will be deployed (Example eu-west-1) |
<User ARN> | ARN of your user |
<DataSetId> | Replace with Dataset ID’s from the data sets you created in the Preparing Quicksight section NOTE: There are 5 unique Dataset IDs |
Run the import
aws quicksight create-dashboard --cli-input-json file://import.json --region <Region> --dashboard-id cudos
aws quicksight describe-dashboard --dashboard-id cudos --region <Region> --aws-account-id <Account_ID>
If you encounter no errors, open QuickSight from the AWS Console, and navigate to Dashboards. You should now see CUDOS available. This dashboard can be shared with other users, but is otherwise ready for viewing and customizing.
If something goes wrong in the dashboard creation step, correct the issue then delete the failed deployment before re-deploying
aws quicksight delete-dashboard --dashboard-id cudos --region <Region> --aws-account-id <Account_ID>
The CID command line tool is an optional way to create the Cloud Intelligence Dashboards. The command line tool will allow you to complete the deployments in less than half the time as the standard manual setup.
Follow the remaining steps if you have not already deployed the Cost Intelligence Dashboard in the previous step .
Select the summary_view dataset
Click Schedule refresh
Click Create
Enter a daily schedule, in the appropriate time zone and click Create
Click Cancel to exit
Click x to exit
Repeat these steps with any remaining Athena datasets except customer_all.
This section is optional and automates the creation of the Cost Intelligence Dashboard and CUDOS Dashboard using a CloudFormation template. The CloudFormation template allows you to complete the lab in less than half the time as the standard setup. You will require permissions to modify CloudFormation templates and create an IAM role. If you do not have the required permissions use the Manual Deployment.
NOTE: An IAM role will be created when you create the CloudFormation stack. Please review the CloudFormation template with your security team and switch to the manual setup if required |
---|
Login via SSO in your Cost Optimization account
Click the Launch CloudFormation button below to open the pre-populated stack template in your CloudFormation console and select Next
Enter a Stack name for your template such as Cost-Intelligence-Dashboard-QuickSight
Review 1stReadMe parameter to confirm prerequisites before specifying the other parameters
Update your AthenaQueryResultsBucket with the Athena results location where your CUR table is
To validate your Athena primary workgroup has an output location by
Update your BucketFolderPath with the S3 path where your year partitions of CUR data are stored
To validate the correct path for your year partitions of the CUR data follow the tasks below:
Update your CURDatabaseName and CURTableName with the name of the CUR Athena Database and Table
To validate the Athena Database and Table of the CUR data follow the tasks below:
Update your QuickSightUser with your QuickSight username
To validate your QuickSight complete the tasks below:
Update your QuicksightIdentityRegion with your QuickSight region
Select Next at the bottom of Specify stack details and then select Next again on the Configure stack options page
Review the configuration, click I acknowledge that AWS CloudFormation might create IAM resources, and click Create stack.
You will see the stack will start in CREATE_IN_PROGRESS
NOTE: This step can take 5-15mins |
---|
Once complete, the stack will show CREATE_COMPLETE
Navigate to Dashboards page in your QuickSight console, click on your Cost Intelligence Dashboard name or your CUDOS Dashboard name
Set up scheduled SPICE refresh for SPICE Datasets manually or click the Launch Spice Refresh CloudFormation button below to open the pre-populated stack template in your CloudFormation console and select Next
Now that you have your dashboard created you can share your dashboard with users or customize your own version of this dashboard
Learn how to replace the Accound IDs with the Account Names for each of your linked accounts in AWS Organizations by following these steps.
If you are tracking our Changelog , you already know that we continue improving Cloud Intelligence Dashboards.
To pull the latest version of the dashboard from the public template please use the following steps.
Visit the GitHub repository
to download and install the CID Command Line Tool and follow the instructions for running the update
command.
{
"AwsAccountId": "<Account_ID>",
"DashboardId": "cudos",
"Name": "CUDOS",
"DashboardPublishOptions": {
"AdHocFilteringOption": {
"AvailabilityStatus": "DISABLED"
}
},
"SourceEntity": {
"SourceTemplate": {
"DataSetReferences": [
{
"DataSetPlaceholder": "summary_view",
"DataSetArn": "arn:aws:quicksight:<region>:<Account_ID>:dataset/<DatasetID>"
},
{
"DataSetPlaceholder": "ec2_running_cost",
"DataSetArn": "arn:aws:quicksight:<region>:<Account_ID>:dataset/<DatasetID>"
},
{
"DataSetPlaceholder": "compute_savings_plan_eligible_spend",
"DataSetArn": "arn:aws:quicksight:<region>:<Account_ID>:dataset/<DatasetID>"
},
{
"DataSetPlaceholder": "s3_view",
"DataSetArn": "arn:aws:quicksight:<region>:<Account_ID>:dataset/<DatasetID>"
},
{
"DataSetPlaceholder": "customer_all",
"DataSetArn": "arn:aws:quicksight:<region>:<Account_ID>:dataset/<DatasetID>"
}
],
"Arn": "arn:aws:quicksight:us-east-1:223485597511:template/cudos_dashboard_v3"
}
}
}
If needed update the update.json to match your details by replacing the following placeholders:
Placeholder | Replace with |
---|---|
<Account_ID> | AWS Account ID where the dashboard will be deployed |
<Region> | Region Code where the dashboard will be deployed (Example eu-west-1) |
<DatasetID> | Replace with Dataset ID’s from the datasets you created in the Preparing Quicksight section NOTE: There are 5 unique Dataset IDs |
Pull the latest published version of the dashboard template. Example for CUDOS Dashboard below:
aws quicksight update-dashboard --cli-input-json file://update.json --region <region>
aws quicksight list-dashboard-versions --region <region> --aws-account-id <Account_ID> --dashboard-id cudos --query 'sort_by(DashboardVersionSummaryList, &VersionNumber)[-1].VersionNumber'
aws quicksight update-dashboard-published-version --region <region> --aws-account-id <Account_ID> --dashboard-id cudos --version-number <version>
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool