You can switch anytime between Elasticsearch & OpenSearch without changing app code. In fact you can use a single code base for different versions of Elasticsearch and AWS OpenSearch at the same time.