# Retrieving partitionkey via logstash-input-kinesis

**URL:** <https://discuss.elastic.co/t/retrieving-partitionkey-via-logstash-input-kinesis/109618>\
**Category:** Logstash\
**Created:** [November 29, 2017, 3:32pm UTC](https://discuss.elastic.co/t/retrieving-partitionkey-via-logstash-input-kinesis/109618 "2017-11-29T15:32:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keithzhang](https://avatars.discourse-cdn.com/v4/letter/k/6a8cbe/32.png) [@keithzhang](https://discuss.elastic.co/u/keithzhang)\
**Post date:** [November 29, 2017, 3:32pm UTC](https://discuss.elastic.co/t/retrieving-partitionkey-via-logstash-input-kinesis/109618/1 "2017-11-29T15:32:08Z")

</div>

We are trying to use logstash-input-kinesis to ingest data from AWS Kinesis into Elasticsearch. Here is our logstash pipeline:

input {  
kinesis{  
kinesis\_stream\_name=\>"xxx"  
application\_name=\>"yyy"  
codec=\> json  
region=\> "us-west-2"  
metrics=\> cloudwatch  
type =\> "kinesisinput"  
}  
...  
output {  
if [type]=="kinesisinput" {  
elasticsearch {  
action =\> "index"  
hosts =\> ["zzz"]  
index =\> "events"  
document\_type =\> "kinesis"  
}  
}  
}

Messages from the "xxx" stream in Kinesis get ingested successfully into Elasticsearch, except that the partitionkey associated with each message is missing. I'd like to know how to retrieve the partitionkey from the stream. 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 27, 2017, 3:32pm UTC](https://discuss.elastic.co/t/retrieving-partitionkey-via-logstash-input-kinesis/109618/2 "2017-12-27T15:32:14Z")

</div>

Closed on December 27, 2017, 3:32pm UTC

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