AWS Billing
Configuration¶
Permissions¶
For AWS cloud collection permissions, see AWS cloud integration role authorization. The read-only permissions required by this integration are listed below.
ce:GetCostAndUsageWithResources: Read cost and usage data grouped by resource.ce:GetDimensionValues: Get service dimension values used in cost queries.
Install Func¶
It is recommended to activate Guance Integration - Extensions - DataFlux Func (Automata)
If deploying Func manually, refer to Manual Deployment of Func
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 Scripts in Hosted Func¶
- Log in to the Guance 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 Billingin theNot Installedlist and click 【Install】 to open the installation form.
Manual Activation Script¶
-
Log in to the Func console, click 【Script Market】, open the Guance script market and search for
integration_aws_billing_by_instance. -
Click 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】 to create the
Startupscript set and configure the corresponding startup scripts automatically. -
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 Guance, check if the corresponding billing information exists in 「Cloud Billing / Billing Analysis」.