SPICE Usage Analytics (Dataset Sizes by User/Group/Namespace, Permissions, etc)

Use Case

Customers at times have challenges in understanding and obtaining information about the SPICE consumption details for a QuickSight account. The maximum SPICE capacity and SPICE capacity consumed in a QuickSight region can be monitored using the Amazon CloudWatch automatic dashboards for QuickSight. As QuickSight adoption grows, customers have the need to analyze how their SPICE is consumed and to secure insights that can help them proactively monitor SPICE datasets.

In this article, we will consider the following 3 use cases:

  • ISV customers with multiple namespaces who would like to know the SPICE usage for each dataset across customer namespaces/groups for all regions.

  • Customers who would like to determine datasets which are created via file upload or via other data sources and analyze SPICE consumption for each of them.

  • Scenarios where customers would like to identify all duplicate datasets or any orphaned datasets not being utilized in an account for housekeeping purposes.

Solution

Using Amazon QuickSight API’s, we can build a solution that can retrieve all the dataset details along with their permissions and ownership and store them in a database or csv files in an Amazon S3 bucket. The data can then be used to build a QuickSight dashboard. Below are the steps to generate the data:

  • List all datasets along with SPICE capacity using ListDataSets and check for Import mode as SPICE.
  • Using the list above, now describe the datasets using DescribeDataSet and get creation date, last updated date, and their permissions using DescribeDataSetPermissions.
  • Retrieve information about File based datasets and their details using ListIngestions.
  • Track SPICE usage by users, groups or namespaces ,get list of all users across all namespaces using ListUsers.
  • List all dashboards using ListDashboards and identify dependent datasets with DescribeDashboard.

The below flowchart outlines the steps required to build the solution:

Shown below is a sample dashboard built in QuickSight from the data extracted to an S3 bucket.

The process to extract all dataset information using API operations can be scheduled to run frequently, and results can be pushed to an S3 bucket in your account. Furthermore, we can use new suites of data ingestion APIs from this link to refresh data in SPICE providing updated view for all insights in dashboard.

In this article, we demonstrated how you can get SPICE consumption details for all datasets for your QuickSight account. We also showed how you can easily determine SPICE usage as well as which datasets are created with the upload file option and which ones are not file-based. Once you obtain all of the above information, you can easily visualize and derive insights and create alerts for dataset usage.

Authors : @Neeraj , @salim

4 Likes

Hi @Neeraj! Thank you for this nice article! Could you clarify one moment please, how did you get total size of the SPICE? I cannot find documented API for this. Is this a legitimate way to get it? Thanks in advance!

Hi @Roman ,

To get Total SPICE “used” capacity you can list all dataset in your account and describe each datasets using DescribeDataSet and check if Import Mode is SPICE then get ConsumedSpiceCapacityInBytes , again this is not applicable for uploaded files as a source. . For File based datasets you may have to use ListIngestions and read all IngestionSizeInBytes .
Adding them all SPICE capacity that’s how we got 69 GB total SPICE capacity as referred in dashboard shown above.

At present there is no API to get total “purchase” SPICE capacity in account ( we have feature request to add one in future). For now this can be input you can provide the way we set 100 GB in dashboard as shown in above example.

1 Like

Thank you very much, @Neeraj! Yes, I came up with similar approach (by summarizing SPICE usage of each dataset). Nice touch on ingestions. Thanks again!

1 Like

Hi @Neeraj,

Good day!

I wanted to check if there are any updates on the requested feature for retrieving the total “purchase” SPICE capacity in the account, as well as the total consumed SPICE capacity via an API.

I read this article and it is very relevant to my case which is:

Create a Lambda function that retrieves the current SPICE Capacity’s Total and Usage in AWS QuickSight. The function should send an SNS notification when the SPICE usage reaches 70%, 80%, 90%, and 100% of the total SPICE capacity.

For example, if the Lambda function retrieves a Total SPICE Capacity of 1.49 TB and a usage of 1.043 TB (approximately 70%), an SNS notification should be triggered. The notification email should contain the following information:

Example: “SPICE usage has reached 70%. Current SPICE usage: 1.043 TB, Total SPICE Capacity: 1.49 TB.”

It would be very appreciated if you can suggest apart from creating a lambda function.

Thank you!