# AWS Cost and Usage Details with Metricbeat

**URL:** <https://discuss.elastic.co/t/aws-cost-and-usage-details-with-metricbeat/241930>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 20, 2020, 8:25pm UTC](https://discuss.elastic.co/t/aws-cost-and-usage-details-with-metricbeat/241930 "2020-07-20T20:25:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevewritescode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevewritescode/32/68742_2.png) [@stevewritescode](https://discuss.elastic.co/u/stevewritescode)\
**Post date:** [July 20, 2020, 8:25pm UTC](https://discuss.elastic.co/t/aws-cost-and-usage-details-with-metricbeat/241930/1 "2020-07-20T20:25:15Z")

</div>

Hi Beats pros!

Is there any recommended way to pull and index AWS cost and usage report data into Elastic?

I've been using the built-in AWS Billing Metricbeat module to pull in billing data from AWS. From what I can tell, the only data that's available through this module is [EstimatedCharges](https://github.com/elastic/beats/blob/7007d97c6aadc4621d58d9d3122dd8e0c5115bb5/x-pack/metricbeat/module/aws/billing/_meta/data.json#L6) since that's the only metric sent through AWS CloudWatch under `AWS/Billing`

I'm mostly interested in `BlendedCost` data, i.e. the kind of info that's available via the aws CLI/API:

```bash
aws ce get-cost-and-usage --time-period Start=2020-06-19,End=2020-07-19 --granularity DAILY --metrics "BlendedCost" --group-by Type=DIMENSION,Key=SERVICE

```

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [July 21, 2020, 10:44am UTC](https://discuss.elastic.co/t/aws-cost-and-usage-details-with-metricbeat/241930/2 "2020-07-21T10:44:56Z")

</div>

Hi @stevewritescode 🙂

I suggest to open an enhancement request in the Github repo directly [https://github.com/elastic/beats/issues](https://github.com/elastic/beats/issues). Maybe that single metric can be added to the Metricset. Beats won't fetch all available metrics and it takes only a handful, waiting for some feedback from the community to add more. So I guess that your request will be welcome.

If you don't want to wait, there's no "fast" way to achieve this. One way would be to create a shell script to run the `cli` tool and output to a file. Then you setup a Ingest pipeline to parse the output data from AWS (using Grok, like many Filebeat modules) [https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html](https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html). Finally you setup filebeat to read that file and use the pipeline

---

<div class="post-metadata">

**Author:** ![stevewritescode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevewritescode/32/68742_2.png) [@stevewritescode](https://discuss.elastic.co/u/stevewritescode)\
**Post date:** [July 21, 2020, 2:23pm UTC](https://discuss.elastic.co/t/aws-cost-and-usage-details-with-metricbeat/241930/3 "2020-07-21T14:23:05Z")

</div>

Enhancement request added at [https://github.com/elastic/beats/issues/20103](https://github.com/elastic/beats/issues/20103). We can continue discussion there. Thanks for the quick reply!

---

<div class="post-metadata">

**Author:** ![stevewritescode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevewritescode/32/68742_2.png) [@stevewritescode](https://discuss.elastic.co/u/stevewritescode)\
**Post date:** [August 18, 2020, 4:23pm UTC](https://discuss.elastic.co/t/aws-cost-and-usage-details-with-metricbeat/241930/4 "2020-08-18T16:23:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
