Amazon Elasticsearch Service 2.3 で [script_exception] scripts of type [inline], operation [search] and lang [mustache] are disabled エラー

Amazon Elasticsearch Service 2.3 で [script_exception] scripts of type [inline], operation [search] and lang [mustache] are disabled エラーが発生したときの対応方針について考えてみました。

AWS | Amazon Web Services

背景 Amazon Elasticsearch Service 2.3 は Mustache 構文は使えない

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

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

対応方針

対応方針は書くまでもないですが、

  1. Mustache 構文を使わない
  2. Amazon Elasticsearch 5.1 以上へ移行する

の2択になります。

とあるプロジェクトでは、5.1 で非推奨な設定や API を利用しているため、アプリケーションコードを書き換えないと 2.3 から 5.1 へ移行できなさそうでした。

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

以上、Amazon Elasticsearch Service 2.3 から 5.1 以上へ移行しないといけない、現場からお送りしました。