# Use sns message value for Elasticsearch input query

**URL:** <https://discuss.elastic.co/t/use-sns-message-value-for-elasticsearch-input-query/307488>\
**Category:** Logstash\
**Created:** [June 17, 2022, 9:19am UTC](https://discuss.elastic.co/t/use-sns-message-value-for-elasticsearch-input-query/307488 "2022-06-17T09:19:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laetitia\_RICHARD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/laetitia_richard/32/85029_2.png) [@Laetitia\_RICHARD](https://discuss.elastic.co/u/Laetitia_RICHARD)\
**Post date:** [June 17, 2022, 9:19am UTC](https://discuss.elastic.co/t/use-sns-message-value-for-elasticsearch-input-query/307488/1 "2022-06-17T09:19:05Z")

</div>

Hello,  
Is there a way to retrieve a value from an SNS message (via an input) and pass that same value to an Elastic input ?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 17, 2022, 5:19pm UTC](https://discuss.elastic.co/t/use-sns-message-value-for-elasticsearch-input-query/307488/2 "2022-06-17T17:19:29Z")

</div>

No events exist when an input is constructed, so its configuration cannot reference the fields of an event. However, you can query Elasticsearch using a [filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-elasticsearch.html), and that _can_ reference events.

---

<div class="post-metadata">

**Author:** ![Laetitia\_RICHARD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/laetitia_richard/32/85029_2.png) [@Laetitia\_RICHARD](https://discuss.elastic.co/u/Laetitia_RICHARD)\
**Post date:** [June 20, 2022, 2:47pm UTC](https://discuss.elastic.co/t/use-sns-message-value-for-elasticsearch-input-query/307488/3 "2022-06-20T14:47:57Z")

</div>

Thank you @Badger for your answer. The use of filter does not cover my need because I need to retrieve a list of identifiers and if I go through the filters, all the objects corresponding to the identifiers are added to the event or I need to 'have one event by identifier.

[image]

---

<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:** [July 18, 2022, 2:48pm UTC](https://discuss.elastic.co/t/use-sns-message-value-for-elasticsearch-input-query/307488/4 "2022-07-18T14:48:19Z")

</div>

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