AWS Cost Explorer Source
The AWS Cost Explorer Source collects cost and usage reports from AWS Cost Explorer. You have the option to collect from one or more specific AWS cost types and set how often reports are collected.
Data collectedβ
Polling Interval | Data |
---|---|
5 min | AWS Cost Explorer |
Setupβ
Source configurationβ
When you create an AWS Cost Explorer collector Source, you add it to an existing Sumo Logic hosted collector. Before creating the Source, identify the hosted collector you want to use or simply create a new hosted collector. For further instructions, see Create a Hosted Collector.
To configure an AWS Cost Explorer Source:
- Classic UI. In the main Sumo Logic menu, select Manage Data > Collection > Collection.
New UI. In the Sumo Logic top menu select Configuration, and then under Data Collection select Collection. You can also click the Go To... menu at the top of the screen and select Collection. - On the Collection page, click Add Source next to a Hosted Collector.
- Search for and select AWS Cost Explorer.
- Enter a Name for the Source in the Sumo Logic console. The Description is optional.
- (Optional) For Source Category, enter any string to tag the output collected from the Source. Category metadata is stored in a searchable field called
_sourceCategory
. - For Fields, click the +Add link to add custom log metadata. Define the fields you want to associate. Each field needs a name (key) and value.
- A green circle with a check mark is shown when the field exists and is enabled in the Fields table schema.
- An orange triangle with an exclamation point is shown when the field doesn't exist, or is disabled, in the Fields table schema. In this case, an option to automatically add or enable the nonexistent fields to the Fields table schema is provided. If a field is sent to Sumo Logic that does not exist in the Fields schema or is disabled it is ignored, known as dropped.
It is preferable to add an account field (for the dashboards) and assign it a friendly name to identify the corresponding AWS account.
- For the AWS Access Key and AWS Secret Key, provide the IAM User access key and secret key you want to use to authenticate collection requests.
Make sure your IAM user has the following IAM policy attached with it.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ce:Describe*",
"ce:Get*",
"ce:List*",
"ec2:DescribeRegions"
],
"Resource": "*"
}
]
} - (Optional) For the Enable Regions field, provide the regions which need to be monitored for cost. The cost incurred across these regions will be fetched separately. The region list here includes all the standard AWS regions along with βglobalβ. βGlobalβ region includes services like Amazon CloudFront, Amazon Route 53, and Amazon IAM. If the field is left empty (default behavior), then data will be fetched from all the enabled regions of the respective AWS account. It is recommended to provide only the regions which are actively used and need to be monitored for cost. This will save the AWS cost for running this source on unused regions.
- For the Cost Type, provide supported cost types / MetricTypes. For details on the CostType, see Amazon's Understanding your AWS Cost Datasets: A Cheat Sheet.
- AmortizedCost
- BlendedCost
- NetAmortizedCost
- NetUnblendedCost
- UnblendedCost
- For Granularity, provide 2 supported granularities for each of the MetricTypes (or cost types):
- Daily Costs (Polled every 12h)
- Monthly Costs (Polled every day)
- Add Processing Rules.
- When you are finished configuring the Source, click Save.
It can take up to 48 hours for AWS to generate your billing data. For accuracy, Sumo Logic does not present any billing analysis for the previous 48-60 hours.
JSON Configurationβ
Sources can be configured using UTF-8 encoded JSON files with the Collector Management API. See how to use JSON to configure Sources for details.
Parameter | Type | Value | Required | Description |
---|---|---|---|---|
schemaRef | JSON Object | {"type":"AWS Cost Explorer"} | Yes | Define the specific schema type. |
sourceType | String | "Universal" | Yes | Type of source. |
config | JSON Object | Configuration object | Yes | Source type specific values. |
Config Parametersβ
Parameter | Type | Required | Default | Description | Example |
---|---|---|---|---|---|
name | String | Yes | null | Type a desired name of the source. The name must be unique per Collector. This value is assigned to the metadata field _source . | "mySource" |
description | String | No | null | Type a description of the source. | "Testing source" |
category | String | No | null | Type a category of the source. This value is assigned to the metadata field _sourceCategory . See best practices for details. | "mySource/test" |
fields | JSON Object | No | null | JSON map of key-value fields (metadata) to apply to the Collector or Source. Use the boolean field _siemForward to enable forwarding to SIEM. | {"_siemForward": false, "fieldA": "valueA"} |
accessID | String | Yes | null | Personal Access Token from the Asana platform. | |
accessKey | String | Yes | null | Personal Access Token from the Asana platform. | |
granularity | String | Yes | null | Personal Access Token from the Asana platform. | |
costMetrics | String array | Yes | Provide a list, such as ["AmortizedCost","BlendedCost","NetAmortizedCost", "NetUnblendedCost","UnblendedCost"] | ||
AWS Region | String array | No | Provide a list, such as ["US East (Ohio)","US West (Oregon)"] |
JSON exampleβ
{
"api.version":"v1",
"source":{
"schemaRef":{
"type":"AWS Cost Explorer"
},
"config":{
"accessID":"********",
"name":"billing200",
"description":"billing200",
"fields":{
"_siemForward":false,
"account":"prod"
},
"accessKey":"********",
"granularity":["daily","monthly"],
"costMetrics":["AmortizedCost","BlendedCost","NetAmortizedCost","NetUnblendedCost","UnblendedCost"],
"category":"aws/billing"
},
"state":{
"state":"Collecting"
},
"sourceType":"Universal"
}
}
Terraform exampleβ
resource "sumologic_cloud_to_cloud_source" "AWS_cost_explorer_source" {
collector_id = sumologic_collector.collector.id
schema_ref = {
type = "AWS Cost Explorer"
}
config = jsonencode({
"accessID":"********",
"name":"billing200",
"description":"billing200",
"fields":{
"_siemForward":false,
"account":"prod"
},
"accessKey":"********",
"granularity":["daily","monthly"],
"costMetrics":["AmortizedCost","BlendedCost","NetAmortizedCost","NetUnblendedCost","UnblendedCost"],
"category":"aws/billing"
})
}
resource "sumologic_collector" "collector" {
name = "my-collector"
description = "Just testing this"
}
FAQβ
Click here for more information about Cloud-to-Cloud sources.