# How to set default pipeline even for indices that don't exist yet

**URL:** https://discuss.elastic.co/t/how-to-set-default-pipeline-even-for-indices-that-dont-exist-yet/226249
**Category:** Elasticsearch
**Created:** [April 2, 2020, 4:26pm UTC](https://discuss.elastic.co/t/how-to-set-default-pipeline-even-for-indices-that-dont-exist-yet/226249 "2020-04-02T16:26:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Goishin](https://avatars.discourse-cdn.com/v4/letter/g/46a35a/32.png) [@Goishin](https://discuss.elastic.co/u/Goishin)
#### Post date: [April 2, 2020, 4:26pm UTC](https://discuss.elastic.co/t/how-to-set-default-pipeline-even-for-indices-that-dont-exist-yet/226249/1 "2020-04-02T16:26:36Z")

</div>

Hi all,  
I'm using ElasticSearch in AWS. It's the default cluster type that you get for free. It is almost entirely managed automatically. My logs go to cloudwatch, and then a lambda streams my log data into ES. I don't seem to have access to the url that is used to upload the data, so I can't define a pipeline to use in the url. So, I then set the default pipeline for the cloudwatch logs indices using curl. However, I just realized that this only works for indices that already exist. The way that cloudwatch streams its logging events into ES, you get a brand new index every day for the log events that took place that day. That means that even though I set the default pipeline, every day there is a new index, and it doesn't have a pipeline set. Is there a way I can specify that all new indices created with the form "cwl-\*" should set their default pipeline to "my-ingest-pipeline"? For instance, is there a default setting I can set at the cluster level instead of the index level? Or maybe something else I'm missing?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [April 2, 2020, 5:54pm UTC](https://discuss.elastic.co/t/how-to-set-default-pipeline-even-for-indices-that-dont-exist-yet/226249/2 "2020-04-02T17:54:09Z")

</div>

I believe you can specify this through an index template.

---

<div class="post-metadata">

### Author: ![Goishin](https://avatars.discourse-cdn.com/v4/letter/g/46a35a/32.png) [@Goishin](https://discuss.elastic.co/u/Goishin)
#### Post date: [April 2, 2020, 6:12pm UTC](https://discuss.elastic.co/t/how-to-set-default-pipeline-even-for-indices-that-dont-exist-yet/226249/3 "2020-04-02T18:12:33Z")

</div>

That's it right there! Thanks so much Christian!

---

<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: [April 30, 2020, 6:12pm UTC](https://discuss.elastic.co/t/how-to-set-default-pipeline-even-for-indices-that-dont-exist-yet/226249/4 "2020-04-30T18:12:40Z")

</div>

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