# Filtering out collected resources in CloudQuery to reduce collection time

**URL:** <https://community.cloudquery.io/t/filtering-out-collected-resources-in-cloudquery-to-reduce-collection-time/396>\
**Category:** CloudQuery Plugins\
**Created:** [February 6, 2024, 1:14pm UTC](https://community.cloudquery.io/t/filtering-out-collected-resources-in-cloudquery-to-reduce-collection-time/396 "2024-02-06T13:14:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![settled-moray](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@settled-moray](https://community.cloudquery.io/u/settled-moray)\
**Post date:** [February 6, 2024, 1:14pm UTC](https://community.cloudquery.io/t/filtering-out-collected-resources-in-cloudquery-to-reduce-collection-time/396/1 "2024-02-06T13:14:22Z")

</div>

Hello Community,

Is there a way to filter out collected resources? We have 300k+ items in `aws_inspector` and although I do want to collect it, it takes a ton of time to collect.

---

<div class="post-metadata">

**Author:** ![kemal](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/kemal/32/42_2.png) [@kemal](https://community.cloudquery.io/u/kemal)\
**Post date:** [February 6, 2024, 1:21pm UTC](https://community.cloudquery.io/t/filtering-out-collected-resources-in-cloudquery-to-reduce-collection-time/396/2 "2024-02-06T13:21:49Z")

</div>

You can use `table_options` to specify input parameters on some `aws_inspector2` tables, documented in [CloudQuery Documentation](https://hub.cloudquery.io/plugins/source/cloudquery/aws/v24.0.0/docs#configuration).

`aws_inspector2_covered_resources` can get a `FilterCriteria`, which is of type [CoverageFilterCriteria](https://docs.aws.amazon.com/sdk-for-go/api/service/inspector2/#CoverageFilterCriteria). It takes a bit of effort to translate that info into the YAML, but it should work.

Which table are you referring to, by the way? If it’s not covered in the `table_options` and the API provides some kind of filtering, we can probably add it.

---

<div class="post-metadata">

**Author:** ![settled-moray](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@settled-moray](https://community.cloudquery.io/u/settled-moray)\
**Post date:** [February 6, 2024, 1:37pm UTC](https://community.cloudquery.io/t/filtering-out-collected-resources-in-cloudquery-to-reduce-collection-time/396/3 "2024-02-06T13:37:47Z")

</div>

```hcl
aws_inspector2_findings

```

---

<div class="post-metadata">

**Author:** ![kemal](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/kemal/32/42_2.png) [@kemal](https://community.cloudquery.io/u/kemal)\
**Post date:** [February 6, 2024, 1:59pm UTC](https://community.cloudquery.io/t/filtering-out-collected-resources-in-cloudquery-to-reduce-collection-time/396/4 "2024-02-06T13:59:19Z")

</div>

that one supports [FilterCriteria](https://docs.aws.amazon.com/sdk-for-go/api/service/inspector2/#FilterCriteria) filters.

---

<div class="post-metadata">

**Author:** ![ben](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/ben/32/88_2.png) [@ben](https://community.cloudquery.io/u/ben)\
**Post date:** [February 6, 2024, 8:26pm UTC](https://community.cloudquery.io/t/filtering-out-collected-resources-in-cloudquery-to-reduce-collection-time/396/5 "2024-02-06T20:26:58Z")

</div>

@settled-moray - We have released `aws_inspector2_findings` with support for incremental syncing in `v24.1.0`. Please note that if you are using the incremental syncing functionality, it is considered a premium table and will be charged as such.
