AWS Cloud Billing
Configuration¶
Install Func¶
We recommend enabling hosted Func under TrueWatch Integrations - Extensions.
To deploy Func yourself, see Deploy Func Yourself
Activate Script¶
Tips
- Prepare an Amazon AK that meets the requirements. In the AWS console, open the IAM user permissions, create an inline policy for
Cost Explorer Service, and selectGetCostAndUsageWithResourcesandGetDimensionValuespermissions.- Before the first collector run, enable
Hourly and Resource Level Datain the AWS console /Amazon Cost Explorer/ Cost Management / Preferences, then wait 24 hours for data to become available.- Set
account_nameandaccount_idin the collectorextra_tags.- To ensure accuracy, collect billing data for
T-1consistently.
Activate the Hosted Script¶
- Log in to the TrueWatch console.
- Click 【Integrations】 and select 【Cloud Account Management】.
- Click 【Add Cloud Account】, select 【AWS】, and enter the required information. Skip this step if the cloud account has already been configured.
- Click 【Test】, then click 【Save】 if the test succeeds. If it fails, check the configuration and test again.
- Find the added cloud account in 【Cloud Account Management】 and click it to open its details page.
- Click 【Integrations】 on the cloud account details page, find
AWS Cloud BillingunderNot Installed, and click 【Install】. Complete the installation in the dialog.
Activate the Script Manually¶
-
Log in to the Func console, click 【Script Market】, open the TrueWatch script market, and search for
integration_aws_billing_by_instance. -
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. -
After activation, find the automatic trigger configuration under 「Management / Automatic Trigger Configuration」. Click 【Execute】 to run it immediately without waiting for the schedule. After a short wait, review the task records and logs.
Verification¶
- Under 「Management / Automatic Trigger Configuration」, confirm that the task has an automatic trigger configured, and check its records and logs for errors.
- In TrueWatch, check 「Cloud Billing / Billing Analysis」 for the corresponding billing information.