# CloudWatch Integration pulling logs from multiple log groups

**URL:** <https://discuss.elastic.co/t/cloudwatch-integration-pulling-logs-from-multiple-log-groups/320288>\
**Category:** Elastic Agent\
**Tags:** integrations\
**Created:** [December 1, 2022, 7:26pm UTC](https://discuss.elastic.co/t/cloudwatch-integration-pulling-logs-from-multiple-log-groups/320288 "2022-12-01T19:26:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![salt\_ninja](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@salt\_ninja](https://discuss.elastic.co/u/salt_ninja)\
**Post date:** [December 1, 2022, 7:26pm UTC](https://discuss.elastic.co/t/cloudwatch-integration-pulling-logs-from-multiple-log-groups/320288/1 "2022-12-01T19:26:38Z")

</div>

Hi team,

I'm trying to use the CloudWatch Integration to pull logs from AWS CloudWatch to Elastic. However, I have only managed to pull logs from a single log group instead of multiple log groups.

I have tried to limit the access policies in the IAM role to pull from the specific log groups I want, and then remove the filter on a specific log groups hoping that the integration would then pull logs from all the log groups that I allowed in the IAM role.  
However, I got an error saying that I need to specify either log group name, log group prefix etc. so it seems the fields cannot be empty.

After this, I tried to add one CloudWatch integration per log group and using the same agent for this, but I was still only able to pull logs from one log group. I couldn't see the logs from the other groups.

My question is then - how do I pull logs from multiple log groups using the CloudWatch integration?

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 29, 2022, 7:27pm UTC](https://discuss.elastic.co/t/cloudwatch-integration-pulling-logs-from-multiple-log-groups/320288/2 "2022-12-29T19:27:24Z")

</div>

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