Skip to content

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

  1. 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 select GetCostAndUsageWithResources and GetDimensionValues permissions.
  2. Before the first collector run, enable Hourly and Resource Level Data in the AWS console / Amazon Cost Explorer / Cost Management / Preferences, then wait 24 hours for data to become available.
  3. Set account_name and account_id in the collector extra_tags.
  4. To ensure accuracy, collect billing data for T-1 consistently.

Activate Scripts in Hosted Func

  1. Log in to the Guance console
  2. Click the 【Integration】 menu and select 【Cloud Account Management】
  3. 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
  4. 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
  5. 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
  6. Click 【Integration】 on the cloud account details page, find AWS Billing in the Not Installed list and click 【Install】 to open the installation form.

Manual Activation Script

  1. Log in to the Func console, click 【Script Market】, open the Guance script market and search for integration_aws_billing_by_instance.

  2. Click 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.

  3. Click 【Deploy Startup Script】 to create the Startup script set and configure the corresponding startup scripts automatically.

  4. 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

  1. Under 【Management / Automatic Trigger Configuration】, confirm that the task has an automatic trigger configuration. Review its task records and logs for errors.
  2. In Guance, check if the corresponding billing information exists in 「Cloud Billing / Billing Analysis」.

Feedback

Is this page helpful?