ML 22467 1
When leadership asks who uses AWS Quick and Kiro, how much, and where agent hours go, you need answers that trace back to records. Administrators also ask for agent hours by team, which supports internal cost allocation by team, and for usage by surface, such as desktop and web.
Quick provides usage datasets that hold those records in your account. A guided, open source setup script delivers four kinds of usage logs to an Amazon Simple Storage Service (Amazon S3) bucket that you own. The logs cover chat activity, agent hours, feedback, and index usage. The script then creates Quick datasets and an optional starter dashboard on them. You can ask the datasets questions in plain language, explore them on the dashboard, and join them with Kiro usage reports and organizational data.
In this post, we show how to set up the usage datasets and ask questions about them. We also cover who can read them, how to extend them with Kiro and organizational data using two additional scripts, and what they can’t answer.
AWS Quick publishes usage events as vended logs. The setup script creates Amazon CloudWatch Logs deliveries that write those events to an S3 bucket that you own. It then creates AWS Glue tables, an Amazon Athena workgroup, and four SPICE datasets: chat activity, agent hours, feedback, and index usage.
Figure 1 shows the flow. The data supports usage reporting and internal cost allocation.
In Figure 1, Kiro reports in S3 and AWS IAM Identity Center users become datasets that join the base datasets and feed additional dashboards.
Run the script in each Region that you report on. Logging starts when setup finishes (Monitoring AWS Quick using CloudWatch Logs). When enabled, the daily schedule refreshes each dataset in full at 02:00 UTC, and you can choose Refresh now for sooner results.
You need the following:
The logs identify people, because each user_arn includes the Quick username, often an email address. IAM access and Quick sharing are separate. Anyone with IAM access to the bucket can read the records. In Quick, only the dataset owner can use the datasets and dashboard until you share them, and every viewer then sees individual activity.
Setting the default access policy to Deny is optional and applies to the whole Quick account. Users and groups without an IAM policy assignment lose access to the S3, Athena, Amazon Redshift, and Amazon Relational Database Service (Amazon RDS) data they use today, administrators included. You can switch back to Allow at any time.
In AWS CloudShell in the same Region, choose Actions, then Upload file, and upload quick_usage_datasets_setup.py. Preview, then run:
Confirm your account ID, then enter the phrase that each step shows, such as CREATE BUCKET. The retention prompt sets how many days logs stay in a new bucket, 365 by default. --bucket reuses a bucket that you own, and the script adds files only under quick-usage-analytics/. For default access, enter DENY DEFAULT ACCESS or SKIP AND ACCEPT EXPOSURE.
To verify the setup, check the following:
aws s3 ls s3://<BUCKET_NAME>/quick-usage-analytics/ --recursive and look for .log.gz files under each dataset prefix.quick-usage-* dataset and confirm that it loads rows.Now ask a question with a defined metric and period. In Quick chat, ask: “How many chat messages did distinct users send in the reporting period?” A message is one chat record, and users are distinct user_arn values. To reconcile the answer, count the same records in Athena for the same dates as the dashboard filters:
In the example, Athena returned 970 messages from 8 users, matching the Messages and Active users tiles in Figure 2. The figures use one reporting period and the Month time scale, so each tile covers the whole period.
For feedback, the Not Useful share is Not Useful ratings divided by all ratings in the period. In the example, Figure 3 shows 227 ratings, and 23.3% (53) were Not Useful. Athena returned the same counts.
Figure 4 shows agent hours by service.
After the base setup, an additional script adds Kiro usage. You need a Kiro profile in the same account, Kiro administrator permissions, and CloudShell in that profile’s Region.
The script creates the kiro-usage-* datasets and the AWS Quick and Kiro usage dashboard. Kiro reports one row for each user, day, and client, so count distinct users, not rows, for monthly reporting.
The kiro-usage-quick_kiro_by_user dataset holds one row for each user and day, joined on user_id. Identities from a different identity store appear as two rows, and records with an empty user_id can’t match. In the example, kiro-usage-user_report loaded the same 399 rows as the files (Figure 5).
A second script adds organizational context. Quick must authenticate through AWS IAM Identity Center, and your users need their organizational fields filled in.
The script creates quick-org-identity-center-users, a quick-usage-<dataset>-with-org copy of each usage dataset, and the AWS Quick usage by organization dashboard. Only the -with-org datasets receive the org_ attributes, such as cost center and department. They refresh with the usage data, but the attributes change only when you rerun quick_usage_org.py. The user dataset is personal data.
Figure 6 shows the organization dashboard, which adds division, department, and cost center filters to each sheet.
Costs come from Athena scans for each refresh, SPICE capacity, S3 storage, and CloudWatch Logs delivery (Quick, Athena, S3, and Amazon CloudWatch pricing). In one example week, the logs were about 89 KB, the datasets used about 0.3 MB of SPICE capacity, and a daily refresh scanned about 77 KB in Athena.
To clean up, run --destroy on the Kiro and organization scripts first, because they read the base datasets. Then run this command:
Each removal asks for its own phrase. It deletes the starter analysis and dashboard, including your customizations. It deletes the log files under quick-usage-analytics/, keeps a bucket that you brought, and leaves the delivery statement in the bucket policy. Deleted usage logs can’t be recovered.
We showed how to set up the AWS Quick usage datasets and ask questions about them in natural language. We also covered the starter dashboard, who can read the data, and where the data stops. For more information about index storage, see Monitor index storage usage. To start, use the GitHub repository and its README. To run your own pipeline, see Build an enterprise observability solution for AWS Quick.
Eligible California state and local agencies can get ChatGPT Enterprise with no monthly platform fee…
Overview This post is divided into three parts; they are: • From Static to Continuous…
In this article, you will learn how to send each step of an AI agent…
As enterprise AI usage evolves from isolated model experiments to massive multi-node training runs and…
The reinstated Nvidia CEO came across as unrepentant, testy, and naive in congressional hearings this…
Microrobots have great potential in biomedicine. They could be used for targeted drug delivery and…