Amazon Web Services - Cost and Usage Extractor
Use the Amazon Web Services - Cost and Usage Extractor to collect the cost and usage data of the virtual machines (EC2 instances) that are provisioned in the Amazon Web Services (AWS) cloud. TrueSight Cloud Cost Control uses this resource usage and cost data to provide forecasting, simulated migration, and cost estimations.
This ETL works in conjunction with the Amazon Web Services - AWS API Extractor. The cost and usage data that is collected is associated with the entities and business services that the AWS API ETL collects.
To learn more about the collection of business service data by ETLs, see Collecting business service data.
Information
In the first couple of days of a month, there might be a data latency of up to two days for the cost and usage data to be available for collection.
Collecting data by using the AWS Cost and Usage ETL
To collect data by using the AWS Cost and Usage ETL, do the following tasks:
I. Complete the preconfiguration tasks.
II. Configure the ETL.
III. Run the ETL.
The ETL requires the following information to connect to AWS and collect data:
- Access key and secret key of the newly-created IAM account
- S3 bucket name
- Name of the daily billing report and its prefix
- Business service tag key
To fetch these details, complete the following preconfiguration tasks. If you have multiple AWS accounts, the owner of the master AWS account must perform the preconfiguration tasks.
Step | Details |
---|---|
Create an S3 bucket to store the daily billing reports of your AWS resources that are generated by AWS. | |
Configure an AWS IAM user account with specific privileges to access billing reports from the S3 bucket. If you already have an IAM user account with the necessary permissions to access S3, you can use the access key ID and the secret key of this user during ETL configuration. In such a case, you can skip this step. | |
Grant permissions to the S3 bucket to store the AWS Cost and Usage report from AWS. | |
Schedule the AWS Cost and Usage report to be generated daily. After you schedule the report generation, it becomes available for collection from the next day. | |
The ETL needs to access the specific API endpoints. If your setup is behind a firewall, enable the access to these endpoints. |
You must configure the ETL to connect to AWS for collecting the cost and usage data of AWS entities. ETL configuration includes specifying the basic and optional advanced properties. While configuring the basic properties is sufficient, you can optionally configure the advanced properties for additional customization.
A. Configuring the basic properties
Some of the basic properties display default values. You can modify these values when required.
To configure the basic properties:
- In the TrueSight Capacity Optimization console, navigate to Administration > ETL & System Tasks, and select ETL tasks.
On the ETL tasks page, click Add > Add ETL. The Add ETL page displays the configuration properties. You must configure properties in the following tabs: Run configuration, Entity catalog, and Amazon Web Services Connection
On the Run Configuration tab, select Amazon Web Services - Cost and Usage Extractor from the ETL module list. The name of the ETL is displayed in the ETL task name box. You can edit this field to customize the name.
- Click the Entity catalog tab, and select one of the following options:
Shared Entity Catalog:Retain the default selection to share the entity catalog with the AWS API ETL, which extracts infrastructure data of the AWS resources.
- From the Sharing with Entity Catalog list, select the entity catalog name that is shared between ETLs.
Private Entity Catalog: Select if only this ETL is used for extracting data from the AWS resources.
Click the Amazon Web Services Connection tab, and configure the following properties:
Property Description Access Key ID Specify the access key ID of the IAM user that you created during the preconfiguration procedure. For example, a typical access key ID looks like: AMAZONACSKEYID007EXAMPLE. Secret Access Key Specify the secret access key that is associated with the access key ID. For example, a typical secret access key looks like: wSecRetAcsKeYY712/K9POTUS/BCZthIZIzprvtEXAMPLEKEY. S3 Bucket name Specify the name of the S3 bucket where you store the billing reports. Report prefix Specify the prefix that is attached to the report. (The prefix corresponds to the directory level in the S3 bucket hierarchy.) Report name Specify the billing report name. Business Service Tag Key Specify the business service tag key that you used in the AWS API ETL for collecting business service data. The AWS API ETL creates business service entities in the Workspace, and maps resources to each business service. The AWS Cost and Usage ETL uses tags of resources to organize resource costs under business services.
The default tag key is Service.
Use proxy Specify whether you want to configure a proxy server, and provide the following details. The default selection is No.
- The fully qualified domain name and the port number of the proxy server host.
- If the proxy server requires authentication, select Yes, and specify the proxy server user name and password.
By default, the proxy server uses the HTTPS protocol for communication.
The following image shows sample configuration values for the basic properties.- The fully qualified domain name and the port number of the proxy server host.
(Optional) Override the default values of properties in the following tabs:
Click Save.
The details of the newly configured AWS Cost and Usage ETL are displayed.
(Optional) B. Configuring the advanced properties
You can configure the advanced properties to change the way the ETL works and to define the data collection period.
To configure the advanced properties:
- On the Add ETL page, click Advanced.
Configure the following properties:
- Click Save.
The ETL tasks page shows the details of the newly configured AWS Cost and Usage ETL.
After you configure the ETL, you can run it to collect data. You can run the ETL in the following modes:
A. Simulation mode: Only validates connection to the data source, does not collect data. Use this mode when you want to run the ETL for the first time or after you make any changes to the ETL configuration.
B. Production mode: Collects data from the data source.
Important
Ensure that you first run the AWS API ETL before running the AWS Cost and Usage ETL.
A. Running the ETL in the simulation mode
To run the ETL in the simulation mode:
- In the TrueSight Capacity Optimization console, navigate to Administration > ETL & System Tasks, and select ETL tasks.
- On the ETL tasks page, click the ETL. The ETL details are displayed.
- In the Run configurations table, click Edit to modify the ETL configuration settings.
- On the Run configuration tab, ensure that the Execute in simulation mode option is set to Yes, and click Save.
- Click Run active configuration. A confirmation message about the ETL run job submission is displayed.
- On the ETL tasks page, check the ETL run status in the Last exit column.
OK Indicates that the ETL ran without any error. You are ready to run the ETL in the production mode. - If the ETL run status is Warning, Error, or Failed:
- On the ETL tasks page, click in the last column of the ETL name row.
- Check the log and reconfigure the ETL if required.
- Run the ETL again.
- Repeat these steps until the ETL run status changes to OK.
B. Running the ETL in the production mode
You can run the ETL manually when required or schedule it to run at a specified time.
Running the ETL manually
- On the ETL tasks page, click the ETL. The ETL details are displayed.
- In the Run configurations table, click Edit to modify the ETL configuration settings. The Edit run configuration page is displayed.
- On the Run configuration tab, select No for the Execute in simulation mode option, and click Save.
- To run the ETL immediately, click Run active configuration. A confirmation message about the ETL run job submission is displayed.
When the ETL is run, it collects data from the source and transfers it to the TrueSight Capacity Optimization database.
Scheduling the ETL run
By default, the ETL is scheduled to run daily. You can customize this schedule by changing the frequency and period of running the ETL.
To configure the ETL run schedule:
- On the ETL tasks page, click the ETL, and click Edit. The ETL details are displayed.
On the Edit task page, do the following, and click Save:
- Specify a unique name and description for the ETL task.
- In the Maximum execution time before warning field, specify the duration for which the ETL must run before generating warnings or alerts, if any.
- Select a predefined or custom frequency for starting the ETL run. The default selection is Predefined.
- Select the task group and the scheduler to which you want to assign the ETL task.
Click Schedule. A message confirming the scheduling job submission is displayed.
When the ETL runs as scheduled, it collects data from the source and transfers it to the TrueSight Capacity Optimization database.
Verify that the ETL ran successfully and the AWS cost data is refreshed in the TrueSight console.
To verify whether the ETL ran successfully:
- In the TrueSight Capacity Optimization console, click Administration > ETL and System Tasks > ETL tasks.
- In the Last exec time column corresponding to the ETL name, verify that the current date and time are displayed.
To verify whether the AWS cost data is refreshed:
- Log in to the TrueSight console.
- Click Cloud Cost Control, and verify whether the AWS cost data is refreshed.
Comments
Log in or register to comment.