# How do i get AWS cloudwatch metrics to elastic for serverless

**URL:** <https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669>\
**Category:** Elasticsearch\
**Created:** [December 31, 2024, 4:17pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669 "2024-12-31T16:17:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpeynado1](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@rpeynado1](https://discuss.elastic.co/u/rpeynado1)\
**Post date:** [December 31, 2024, 4:17pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/1 "2024-12-31T16:17:25Z")

</div>

Hello,

I am trying to push cloudwatch metrics via sqs to elastic. How do i go about doing this?  
these are for multiple servers and serverless applications

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 2, 2025, 4:26pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/2 "2025-01-02T16:26:02Z")

</div>

Hi @rpeynado1 Welcome to the community.

There are a number of ways to ingest cloudwatch metrics via SQS or perhaps other ways.

Important:

- What version of the Elastic Stack are you on?
- Self-Managed or Elastic Cloud Hosted, Elastic Cloud Serverless 🙂
- Do you have Fleet Running?

Elastic Agent is a method you could use. Note for this method you need to provide a VM(s) to run the Elastic Agent on.

There is a blog on this very topic

> **[Get the most from Elastic Agent with Amazon S3 and SQS](https://www.elastic.co/blog/elastic-agent-amazon-s3-sqs)**
>
> In this post, we cover how the Performance Presets introduced in 8.12 enable new Elastic users to worry less about how the data gets into Elasticsearch and focus on the valuable insights available thr...

> **[AWS SQS | Elastic integrations | Elastic](https://www.elastic.co/guide/en/integrations/current/aws-sqs.html)**

You can also ingest the metrics directly from Cloudwatch

> **[AWS CloudWatch | Elastic integrations | Elastic](https://www.elastic.co/guide/en/integrations/current/aws-cloudwatch.html)**

If you can route your metrics through AWS Firehose you could use this..

> **[Amazon Data Firehose | Elastic integrations | Elastic](https://www.elastic.co/guide/en/integrations/current/awsfirehose.html)**

---

<div class="post-metadata">

**Author:** ![rpeynado1](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@rpeynado1](https://discuss.elastic.co/u/rpeynado1)\
**Post date:** [January 2, 2025, 7:08pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/4 "2025-01-02T19:08:34Z")

</div>

hi @stephenb

thank you for the response

1. our version is 8.15.2
2. we are using ECk
3. and we do have a fleet running

i will take a look at those articles. the one with firehouse wont work. i think our infrastructure does not allow it

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 2, 2025, 7:15pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/5 "2025-01-02T19:15:53Z")

</div>

Sounds like Elastic Agent with the  
[SQS Input](https://www.elastic.co/guide/en/integrations/current/aws-sqs.html)  
Or  
Just the direct [Cloudwatch Metrics integration](https://www.elastic.co/guide/en/integrations/current/aws-cloudwatch.html)  
would be a good place to start

Note if you have high volume, you can run more than 1 Agent against an SQS queue for parallelization.

---

<div class="post-metadata">

**Author:** ![rpeynado1](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@rpeynado1](https://discuss.elastic.co/u/rpeynado1)\
**Post date:** [January 2, 2025, 8:13pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/6 "2025-01-02T20:13:46Z")

</div>

@stephenb i do need a server for the elastic agent right? is it possible to use an elastic agent in a serverless environment? forgive me if these are dumb questions i am extremely new to this process

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 2, 2025, 8:29pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/7 "2025-01-02T20:29:19Z")

</div>

> [@rpeynado1](#):
>
> @stephenb i do need a server for the elastic agent right? is it possible to use an elastic agent in a serverless environment? forgive me if these are dumb questions i am extremely new to this process

Running agent on ECK / K8s can be done but can be tricky for what you are trying to do. The quickstart is geared toward monitoring the K8s and will be a daemonset... not exactly what you want to do.

You would probably want to convert to a deployment but a daemonset might work.

> **[Run Fleet-managed Elastic Agent on ECK | Elastic Cloud on Kubernetes \[2.16\] |...](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-elastic-agent-fleet.html)**

Otherwise

You can provide a VM(s) to run the Elastic Agent on...

You can run it as a Docker container or deploy it on bare metal.

Ahhh I forgot we also have the Elastic Serverless Forwarder ... perhaps that might be a good fit (I am not an expert on that) but look like it might be a good fit.

> **[Elastic Serverless Forwarder for AWS | Elastic Serverless Forwarder Guide |...](https://www.elastic.co/guide/en/esf/current/aws-elastic-serverless-forwarder.html)**
>
> The Elastic Serverless Forwarder is an Amazon Web Services (AWS) Lambda function that ships logs from your AWS environment to Elastic.

---

<div class="post-metadata">

**Author:** ![rpeynado1](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@rpeynado1](https://discuss.elastic.co/u/rpeynado1)\
**Post date:** [January 2, 2025, 8:34pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/8 "2025-01-02T20:34:52Z")

</div>

thank you so much! i really appreciate it. i will look into these. the serverless forwarder looks promising, but i noticed that it is more geared towards "logs" do you reckon it will work for metrics?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 2, 2025, 8:36pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/9 "2025-01-02T20:36:59Z")

</div>

Hmmm ... yeah kinda looks like that...

So Wait... I am confused what are you trying to ingest?  
Exactly what metrics?

In the end... It is probably the Simplest... Fastest ...  
to Deploy Fleet Managed Elastic Agent on a VM, then you can try all sorts of integration easily... that is what I would do...

Then, I would optimize and scale after you understand what you need, what you are shipping, and what Integration and Processing you need...

In the end you need to roll up your sleeves, pull out the Helmet and Flashlight and give it a try 🙂 🔦

---

<div class="post-metadata">

**Author:** ![rpeynado1](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@rpeynado1](https://discuss.elastic.co/u/rpeynado1)\
**Post date:** [January 8, 2025, 3:58pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/10 "2025-01-08T15:58:44Z")

</div>

@stephenb I was able to flush out some more details on the issue. We have an elastic agent for AWS. We are trying to turn on the Collect “SQS metrics” function but its giving a “list metrics error”. Do you have any insights on how to trouble shoot this?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [January 8, 2025, 5:26pm UTC](https://discuss.elastic.co/t/how-do-i-get-aws-cloudwatch-metrics-to-elastic-for-serverless/372669/11 "2025-01-08T17:26:51Z")

</div>

Hi @rpeynado1

> [@rpeynado1](#):
>
> We are trying to turn on the Collect “SQS metrics” function but its giving a “list metrics error”.

You are going to need to provide a lot more detail.

SQS Metrics is a lot different than your original post...

Please show the Exact Integration you are trying to configure and any full error messages etc... where they are coming from etc..etc..

Have you upgraded the integration to the latest ? v2.38.1

My initial guess is that you may have a connectivity issue from inside your K8s ECK from the agent container out to the SQS ... that is not based on anything impercial just a guess...

As I said, running elastic agents INSIDE k8s and reaching outside assets can be tricky.

I usually suggest get the elastic agent and integration working on a standalone EC2 instance Then work on moving that configuration into K8S / ECK

That is just a suggestion
