# Logstash conf error - amazon\_es

**URL:** <https://discuss.elastic.co/t/logstash-conf-error-amazon-es/118998>\
**Category:** Logstash\
**Created:** [February 8, 2018, 8:56am UTC](https://discuss.elastic.co/t/logstash-conf-error-amazon-es/118998 "2018-02-08T08:56:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_Maffert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anthony_maffert/32/27527_2.png) [@Anthony\_Maffert](https://discuss.elastic.co/u/Anthony_Maffert)\
**Post date:** [February 8, 2018, 8:56am UTC](https://discuss.elastic.co/t/logstash-conf-error-amazon-es/118998/1 "2018-02-08T08:56:35Z")

</div>

Hi,

I am trying to configure for the first time my logstash.conf file with an output to amazon\_es.  
However, i get the following error:

```
[ERROR][logstash.outputs.amazones] Failed to install template: [400] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [@version]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_default_]: No handler for type [string] declared on field [@version]","caused_by":{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [@version]"}},"status":400}

```

My whole _logstash.conf_ file is here:

```
input {
  jdbc { 
    jdbc_connection_string => "jdbc:mysql://localhost:3306/testdb"
    # The user we wish to execute our statement as
    jdbc_user => "root"
    jdbc_password => "root"
    # The path to our downloaded jdbc driver
    jdbc_driver_library => "/mnt/c/Users/xxxxxxxx/mysql-connector-java-5.1.45/mysql-connector-java-5.1.45-bin.jar"
    jdbc_driver_class => "com.mysql.jdbc.Driver"
    # our query
    statement => "SELECT * FROM testtable"
    }
  }
output {
  amazon_es {
    hosts => ["search-xxxxx.eu-west-3.es.amazonaws.com"]
    region => "eu-west-3"
    aws_access_key_id => 'xxxxxxxxxxxxxxxxxxxxxx'
    aws_secret_access_key => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    index => "test-migrate"
    document_type => "data"
    }
}

```

I have 3 elements selected from my database, but the first time i run the script, only the first element is indexed in elastic search. The second time i run it, all 3 elements are indexed. I get the error each time i run logstash with this conf file.

Can someone help me with this version field issue please?

--  
Anthony

---

<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:** [March 8, 2018, 8:57am UTC](https://discuss.elastic.co/t/logstash-conf-error-amazon-es/118998/2 "2018-03-08T08:57:06Z")

</div>

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