9

We have an AWS Elasticsearch domain we created through CloudFormation running version 6.3 of ES. When we update the ElasticsearchVersion property in the template, it replaces the Elasticsearch domain with a new one running the new version instead of updating the existing one.

How does anyone upgrade their Elasticsearch domains that were deployed with CF if it doesn't do an in-place upgrade? I am almost thinking at this point I need to create and manage my ES domains through boto3.

Any insight or ideas would be greatly appreciated.

seemach1
  • 303
  • 2
  • 8

2 Answers2

14

This is now possible (as of 25/11/2019) by setting an UpdatePolicy with EnableVersionUpgrade: True.

For example:

ElasticSearchDomain:
    Type: AWS::Elasticsearch::Domain
    Properties: ...
    UpdatePolicy:
        EnableVersionUpgrade: true

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-upgradeelasticsearchdomain

Tom Dufall
  • 871
  • 1
  • 10
  • 21
6

Received correspondence back from AWS Support regarding an ES in-place upgrade through CloudFormation.

tl;dr It is currently not supported but a feature request is already active for this functionality.

You are correct in saying that ES in-place upgrade is not supported by CFN at this moment. Thus upgrading ES from 6.3 to 6.4 can be done via CLI or AWS Console will keep the existing domain, but with CloudFormation, it will launch a new domain and discard the existing one.

I see that there is already an active feature request for this. I will go ahead and pass your sentiment regards to our internal team about this matter as well. Unfortunately, AWS Support does not have visibility to service enhancement implementation roadmap, so I would not be able to provide you with an exact time frame.

Community
  • 1
  • 1
seemach1
  • 303
  • 2
  • 8