Amazon Elasticsearch Service 2.3 [script_exception] scripts of type [inline], operation [search] and lang [mustache] are disabled Error

Tadashi Shigeoka ·  Thu, December 19, 2019

I considered response strategies when encountering the [script_exception] scripts of type [inline], operation [search] and lang [mustache] are disabled error in Amazon Elasticsearch Service 2.3.

AWS | Amazon Web Services

Background: Amazon Elasticsearch Service 2.3 Cannot Use Mustache Syntax

[script_exception] scripts of type [inline], operation [search] and lang [mustache] are disabled

Reference: Amazon Elasticsearch Service で Search Template が利用できるようになりました | Developers.IO

Response Strategy

The response strategy is obvious:

  1. Don't use Mustache syntax
  2. Migrate to Amazon Elasticsearch 5.1 or higher

These are the two options.

In a certain project, deprecated settings and APIs in 5.1 were being used, so it seemed migration from 2.3 to 5.1 wouldn’t be possible without rewriting application code.

Reference: Amazon Elasticsearch Service でバージョン 2.3 から 5.1 へ移行する | Developers.IO

That’s all from the Gemba.