AWS Bedrock
Collect AWS Bedrock monitoring data.
Configuration¶
Install Func¶
We recommend enabling hosted Func under Integration - Extensions in TrueWatch. All prerequisites are installed automatically; continue with the script installation.
If deploying Func manually, refer to Manual Deployment of Func
Activate Script¶
Note: Prepare an AWS AK that meets the requirements. For simplicity, you can grant the global read-only permission
ReadOnlyAccessdirectly.
Activate Scripts in Hosted Func¶
- Log in to the TrueWatch console
- Click the 【Integration】 menu and select 【Cloud Account Management】
- Click 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If you have already configured the cloud account information before, ignore this step
- Click 【Test】, and if the test is successful, click 【Save】. If the test fails, please check if the relevant configuration information is correct and test again
- Click 【Cloud Account Management】, and you can see the added cloud account in the list. Click the corresponding cloud account to enter the details page
- Click 【Integration】 on the cloud account details page, find
AWS Bedrockin theNot Installedlist and click 【Install】 to open the installation form.
Manual Activation Script¶
- Log in to the Func console, click 【Script Market】, open the TrueWatch script market and search for
integration_aws_cloudwatch. - Click 【Install】 and enter AWS AK ID, AK Secret, and the account name.
- Click Deploy Startup Script. The system automatically creates the
Startupscript set and configures the startup script. Incollector_configs, setregionsto the actual regions and changetargetsto the metric configuration forAWS/Bedrock. Then publish and enable automatic triggers. - After enabling the script, open 【Management / Automatic Trigger Configuration】 to view its automatic trigger configuration. Click 【Execute】 to run it immediately without waiting for the scheduled time. After a short wait, review the task records and logs.
Verification¶
- Under 【Management / Automatic Trigger Configuration】, confirm that the task has an automatic trigger configuration. Review its task records and logs for errors.
- In TrueWatch, open Metrics and check for the monitoring data.
Metrics¶
After configuring AWS CloudWatch, the default metrics are listed below. You can configure additional metrics. The measurement is aws_bedrock. AWS Bedrock metric details
| MetricName | MetricDescribe | Dimensions | Unit |
|---|---|---|---|
input_token_count_sum |
Total input tokens | region_id, model_id, context_window | count |
invocation_latency_average |
Average latency from sending the request to receiving the last token | region_id, model_id, context_window | ms |
invocation_server_errors_sum |
Invocations with AWS server errors | region_id, model_id | count |
invocation_throttles_sum |
Throttled invocations | region_id, model_id | count |
invocations_sum |
Requests accepted for processing | region_id, model_id, context_window | count |
output_token_count_sum |
Total output tokens | region_id, model_id, context_window | count |