Skip to content

(elasticsearch): support OpenSearch 1.0 #16467

@jumic

Description

@jumic

AWS renamed Amazon Elasticsearch Service to Amazon OpenSearch Service. In addition, the new version OpenSearch 1.0 was introduced.

Announcement:
https://aws.amazon.com/about-aws/whats-new/2021/09/amazon-elasticsearch-service-amazon-opensearch-service-opensearch-1-0/

Use Case

Use new features introduced by OpenSearch 1.0.

Proposed Solution

  1. Rename "Amazon Elasticsearch Service Construct Library" to "Amazon OpenSearch Service Construct Library" (README)
  2. Introduce OpenSearch in README and code documentation, explain that this construct can be used for OpenSearch and Elasticsearch.
  3. Don't rename the module and the existing classes of this module, this would be a breaking change. The resources in CloudFormation were not renamed, too.
  4. Add new version constant ElasticsearchVersion.V_OPENSEARCH_1_0.
  5. Refactor validations - "Elasticsearch 5.1 or later or any version of OpenSearch" must consider that version 1.0 (OpenSearch) and above is supported while Elasticsearch versions less than 5.1 are not supported.

Proposed Solution for new version constants

Add new enum EngineType with values ELASTICSEARCH and OPENSEARCH,

New versions can be initialized by passing the optional parameter engineType.

public static of(version: string, engineType: EngineType = EngineType.ELASTICSEARCH) {
  return new ElasticsearchVersion(version, engineType);
}

The specific version constant looks like this:

/** AWS OpenSearch 1.0 */
public static readonly V_OPENSEARCH_1_0 = ElasticsearchVersion.of('1.0', EngineType.OPENSEARCH);

The enum provides the posibility to differentiate between Elasticsearch and OpenSearch versions.

Other

If you welcome community contribution to this feature request, could you please give a short feedback to the proposed solution? Thanks.

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-elasticsearchRelated to Amazon Elasticsearch Serviceeffort/largeLarge work item – several weeks of effortfeature-requestA feature should be added or improved.needs-cfnThis issue is waiting on changes to CloudFormation before it can be addressed.p1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions