tree: 67ac54f17504e0a5a5aa2b474e445b1a951ed19f
  1. api/
  2. impl/
  3. models/
  4. tasks/
  5. img.png
  6. q_dev.go
  7. Q_DEV_deploy_guide.md
  8. README.md
backend/plugins/q_dev/README.md

Q Developer Plugin

This plugin is used to retrieve AWS Q Developer usage data from AWS S3, process and analyze it, and resolve user display names through AWS IAM Identity Center.

Features

  • Retrieve CSV files from a specified prefix in AWS S3
  • Parse user usage data from CSV files
  • Resolve user UUIDs to human-readable display names via AWS IAM Identity Center
  • Aggregate data by user and calculate various metrics

Configuration

Configuration items include:

  1. AWS Access Key ID
  2. AWS Secret Key
  3. AWS Region
  4. S3 Bucket Name
  5. Rate Limit (per hour)
  6. IAM Identity Center Store ID
  7. IAM Identity Center Region

You can create a connection using the following curl command:

curl 'http://localhost:8080/plugins/q_dev/connections' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "q_dev_connection",
    "accessKeyId": "<YOUR_ACCESS_KEY_ID>",
    "secretAccessKey": "<YOUR_SECRET_ACCESS_KEY>",
    "region": "<AWS_REGION>",
    "bucket": "<YOUR_S3_BUCKET_NAME>",
    "identityStoreId": "<YOUR_IDENTITY_STORE_ID>",
    "identityStoreRegion": "<YOUR_IDENTITY_CENTER_REGION>",
    "rateLimitPerHour": 20000
}'

Please replace the following placeholders with actual values: <YOUR_ACCESS_KEY_ID>: Your AWS access key ID <YOUR_SECRET_ACCESS_KEY>: Your AWS secret access key <YOUR_S3_BUCKET_NAME>: The S3 bucket name you want to use <AWS_REGION>: The region where your S3 bucket is located <YOUR_IDENTITY_STORE_ID>: Your IAM Identity Center Store ID (format: d-xxxxxxxxxx) <YOUR_IDENTITY_CENTER_REGION>: The region where your Identity Center is deployed

You can get all connections using the following curl command:

curl Get 'http://localhost:8080/plugins/q_dev/connections'

Data Flow

The plugin includes the following tasks:

  1. collectQDevS3Files: Collects file metadata information from S3, without downloading file content
  2. extractQDevS3Data: Uses S3 file metadata to download CSV data, parse it into the database, and resolve user display names via Identity Center
  3. convertQDevUserMetrics: Converts user data into aggregated metrics, calculating averages and totals

Data Tables

  • _tool_q_dev_connections: Stores AWS S3 connection information
  • _tool_q_dev_s3_file_meta: Stores S3 file metadata
  • _tool_q_dev_user_data: Stores user data parsed from CSV files
  • _tool_q_dev_user_metrics: Stores aggregated user metrics

Note: _tool_q_dev_user_data and _tool_q_dev_user_metrics tables now include display_name fields for human-readable user identification.

Data Collection Configuration

Steps to collect data:

  1. On the Config UI page, select Advanced Mode on the left, click Blueprints
  2. Create a new Blueprint
  3. img.png Click the gear icon on the right
  4. Paste the following JSON configuration into JSON Configuration:
[
  [
    {
      "plugin": "q_dev",
      "subtasks": null,
      "options": {
        "connectionId": 5,
        "s3Prefix": ""
      }
    }
  ]
]